mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-12-18 16:20:17 +00:00
Improved logging in cleanup_tweet_text
This commit is contained in:
parent
857a7f9b9e
commit
3a2c8093a3
5
twoot.py
5
twoot.py
|
@ -104,9 +104,9 @@ def cleanup_tweet_text(tt_iter, twit_account, status_id, tweet_uri, get_vids):
|
||||||
tweet_text += '\n\n[Video embedded in original tweet]'
|
tweet_text += '\n\n[Video embedded in original tweet]'
|
||||||
except OSError:
|
except OSError:
|
||||||
logging.error("Could not execute twitterdl.py (is it there? Is it set as executable?)")
|
logging.error("Could not execute twitterdl.py (is it there? Is it set as executable?)")
|
||||||
sys.exit(-1)
|
|
||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
# Video download and encoding took too long
|
# Video download and encoding took too long
|
||||||
|
logging.error("twitterdl.py execution timed out")
|
||||||
tweet_text += '\n\n[Video embedded in original tweet]'
|
tweet_text += '\n\n[Video embedded in original tweet]'
|
||||||
else:
|
else:
|
||||||
tweet_text += '\n\n[Video embedded in original tweet]'
|
tweet_text += '\n\n[Video embedded in original tweet]'
|
||||||
|
@ -137,7 +137,7 @@ def cleanup_tweet_text(tt_iter, twit_account, status_id, tweet_uri, get_vids):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("*** WARNING: No handler for tag in twitter text: " + tag.prettify())
|
logging.warning("No handler for tag in twitter text: " + tag.prettify())
|
||||||
|
|
||||||
return tweet_text
|
return tweet_text
|
||||||
|
|
||||||
|
@ -349,7 +349,6 @@ def main(argv):
|
||||||
tweet = {
|
tweet = {
|
||||||
"author": author,
|
"author": author,
|
||||||
"author_account": author_account,
|
"author_account": author_account,
|
||||||
"author_logo_url": author_logo_url,
|
|
||||||
"timestamp": timestamp,
|
"timestamp": timestamp,
|
||||||
"tweet_id": tweet_id,
|
"tweet_id": tweet_id,
|
||||||
"tweet_text": tweet_text,
|
"tweet_text": tweet_text,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user