Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions got3/manager/TweetManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def getTweets(tweetCriteria, receiveBuffer=None, bufferLength=100, proxy=None):
tweetPQ = PyQuery(tweetHTML)
tweet = models.Tweet()

usernameTweet = tweetPQ("span.username.js-action-profile-name b").text()
# usernameTweet = tweetPQ("span.username.js-action-profile-name b").text()
txt = re.sub(r"\s+", " ", tweetPQ("p.js-tweet-text").text().replace('# ', '#').replace('@ ', '@'))
retweets = int(tweetPQ("span.ProfileTweet-action--retweet span.ProfileTweet-actionCount").attr("data-tweet-stat-count").replace(",", ""))
favorites = int(tweetPQ("span.ProfileTweet-action--favorite span.ProfileTweet-actionCount").attr("data-tweet-stat-count").replace(",", ""))
Expand All @@ -56,7 +56,7 @@ def getTweets(tweetCriteria, receiveBuffer=None, bufferLength=100, proxy=None):
pass
tweet.id = id
tweet.permalink = 'https://twitter.com' + permalink
tweet.username = usernameTweet
tweet.username = tweet.username = re.split('/', permalink)[1]

tweet.text = txt
tweet.date = datetime.datetime.fromtimestamp(dateSec)
Expand Down