This commit is contained in:
jeancf 2021-03-07 21:26:58 +01:00
commit 56b87e4756

View File

@ -160,6 +160,7 @@ def process_attachments(nitter_url, attachments_container, get_vids, twit_accoun
dl_feedback = subprocess.run(
["./twitterdl.py", video_file, "-ooutput/" + twit_account + "/" + status_id, "-w 500"],
capture_output=True,
timeout=300
)
if dl_feedback.returncode != 0:
logging.warning('Video in tweet ' + status_id + ' from ' + twit_account + ' failed to download')
@ -272,7 +273,7 @@ def main(argv):
# pass
# 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(' -t ' + twit_account)
logging.info(' -i ' + mast_instance)
@ -322,7 +323,7 @@ def main(argv):
# Verify that download worked
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)
logging.info('Nitter page downloaded successfully')