Commit 8ee5b62c authored by Cody Zacharias's avatar Cody Zacharias Committed by GitHub

Update to print mentioned users in tweet.

parent 66f63104
......@@ -84,6 +84,11 @@ class tweep:
username = tweet.find('span','username').text.encode('utf8').replace('@','')
timezone = strftime("%Z", gmtime())
text = tweet.find('p','tweet-text').text.encode('utf8').replace('\n',' ')
try:
mentions = tweet.find("div", "js-original-tweet")['data-mentions'].split(" ")
for i in range(len(mentions)):
text = "@{} {}".format(mentions[i], text)
except: pass
if arg.pics:
tweet_url = "https://twitter.com/{0}/status/{1}/photo/1".format(username,tweetid)
self.tweet_urls.append(tweet_url)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment