crawl only mentions, no replies

master
b3yond 2018-10-05 11:02:12 +02:00
parent a70a7593ad
commit 272fcb2d49
1 changed files with 7 additions and 5 deletions

View File

@ -50,11 +50,13 @@ class TwitterBot(Bot):
text = re.sub(
"(?<=^|(?<=[^a-zA-Z0-9-_\.]))@([A-Za-z]+[A-Za-z0-9-_]+)",
"", status.text)
reports.append(report.Report(status.author.screen_name,
self,
text,
status.id,
status.created_at))
username = api.me()
if username in status.text:
reports.append(report.Report(status.author.screen_name,
self,
text,
status.id,
status.created_at))
user.save_seen_tweet(status.id)
return reports
except tweepy.RateLimitError: