mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-03-27 16:06:46 +00:00
Merge branch 'master' of https://gitlab.com/jeancf/twoot
This commit is contained in:
commit
56b87e4756
5
twoot.py
5
twoot.py
@ -160,6 +160,7 @@ def process_attachments(nitter_url, attachments_container, get_vids, twit_accoun
|
|||||||
dl_feedback = subprocess.run(
|
dl_feedback = subprocess.run(
|
||||||
["./twitterdl.py", video_file, "-ooutput/" + twit_account + "/" + status_id, "-w 500"],
|
["./twitterdl.py", video_file, "-ooutput/" + twit_account + "/" + status_id, "-w 500"],
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
|
timeout=300
|
||||||
)
|
)
|
||||||
if dl_feedback.returncode != 0:
|
if dl_feedback.returncode != 0:
|
||||||
logging.warning('Video in tweet ' + status_id + ' from ' + twit_account + ' failed to download')
|
logging.warning('Video in tweet ' + status_id + ' from ' + twit_account + ' failed to download')
|
||||||
@ -272,7 +273,7 @@ def main(argv):
|
|||||||
# pass
|
# pass
|
||||||
|
|
||||||
# Setup logging to file
|
# Setup logging to file
|
||||||
logging.basicConfig(filename=twit_account + '.log', level=logging.WARNING)
|
logging.basicConfig(filename=twit_account + '.log', level=logging.INFO)
|
||||||
logging.info('Running with the following parameters:')
|
logging.info('Running with the following parameters:')
|
||||||
logging.info(' -t ' + twit_account)
|
logging.info(' -t ' + twit_account)
|
||||||
logging.info(' -i ' + mast_instance)
|
logging.info(' -i ' + mast_instance)
|
||||||
@ -322,7 +323,7 @@ def main(argv):
|
|||||||
|
|
||||||
# Verify that download worked
|
# Verify that download worked
|
||||||
if twit_account_page.status_code != 200:
|
if twit_account_page.status_code != 200:
|
||||||
logging.fatal('The Nitter page did not download correctly. Aborting')
|
logging.fatal('The Nitter page did not download correctly from' + url + '. Aborting')
|
||||||
exit(-1)
|
exit(-1)
|
||||||
|
|
||||||
logging.info('Nitter page downloaded successfully')
|
logging.info('Nitter page downloaded successfully')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user