1
0
mirror of https://github.com/balkian/bitter.git synced 2024-09-27 18:51:42 +00:00

Fixed tweet error

This commit is contained in:
J. Fernando Sánchez 2017-05-21 21:27:46 +02:00
parent 1cb86abbdd
commit e65f6836b3
2 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
0.7.1 0.7.2

View File

@ -315,12 +315,12 @@ def get_user(c, user):
def download_tweet(wq, tweetid, write=True, folder="downloaded_tweets", update=False): def download_tweet(wq, tweetid, write=True, folder="downloaded_tweets", update=False):
cached = cached_tweet(tweetid, folder) cached = cached_tweet(tweetid, folder)
newtweet = None tweet = None
if update or not cached: if update or not cached:
newtweet = get_tweet(wq, tweetid) tweet = get_tweet(wq, tweetid)
js = json.dumps(tweet, indent=2) js = json.dumps(tweet, indent=2)
if write: if write:
if newtweet: if tweet:
write_tweet_json(js, folder) write_tweet_json(js, folder)
else: else:
print(js) print(js)