fixed unrecognisable lang bug
This commit is contained in:
parent
2b98565444
commit
79f54079f7
2 changed files with 5 additions and 2 deletions
|
|
@ -31,7 +31,10 @@ class TootCrawler():
|
|||
timelinePagination = self.mastodonInstance.fetch_previous(timelinePagination)
|
||||
for i in allTimelineResults:
|
||||
content = self.cleanhtml(i.content)
|
||||
language = detect(content)
|
||||
try:
|
||||
language = detect(content)
|
||||
except:
|
||||
language = None
|
||||
sentiment = self.sentiTooter.analyze(language, content)
|
||||
toot = {
|
||||
"sentiment": sentiment[0],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue