Add "reply-to-self" tags to tweets

Add "reply-to-self" tags to tweets where the author and "in reply to" user have the same id
This commit is contained in:
thinkpoop 2017-12-26 16:35:16 -06:00 committed by GitHub
parent 4195ed1584
commit 17df09b65b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -188,6 +188,8 @@ class TwitterFetcher:
if not isinstance(author, dict): author = author.__dict__
author_name = author['screen_name']
original_author_name = author_name
if user_tweet['in_reply_to_user_id'] == author['id']:
categories.add('reply-to-self')
retweet_author = ""
if 'retweeted_status' in user_tweet:
retweet_author = """Retweeted by
@ -279,4 +281,4 @@ class TwitterFetcher:
'pubdate': user_tweet['created_at'],
}
return story
return story