diff --git a/twoot.py b/twoot.py index e7141a6..61fb363 100755 --- a/twoot.py +++ b/twoot.py @@ -386,21 +386,22 @@ def main(argv): toml['options']['tweet_delay'] = float(args['d']) if args['c'] is not None: toml['options']['toot_cap'] = int(args['c']) + mast_password = args['p'] # Verify that we have a minimum config to run if 'twitter_account' not in toml['config'].keys(): - print('Missing Twitter account') + print('CRITICAL: Missing Twitter account') exit(-1) if 'mastodon_instance' not in toml['config'].keys(): - print('Missing Mastodon instance') + print('CRITICAL: Missing Mastodon instance') exit(-1) if 'mastodon_user' not in toml['config'].keys(): - print('Missing Mastodon user') + print('CRITICAL: Missing Mastodon user') + exit(-1) + if mast_password is None: + print('CRITICAL: Missing Mastodon user password') exit(-1) - # mast_password = args['p'] - # suppress_retweets = args['s'] - # get_vids = args['v'] # remove_trackers = args['u'] # max_age = float(args['a']) # min_delay = float(args['d']) @@ -539,7 +540,7 @@ def main(argv): continue # Check if retweets must be skipped - if suppress_retweets: + if toml['options']['skip_retweets']: # Check if this tweet is a retweet if len(status.select("div.tweet-body > div > div.retweet-header")) != 0: logging.debug("Retweet ignored per command-line configuration") @@ -602,7 +603,7 @@ def main(argv): # Process attachment: capture image or .mp4 url or download twitter video attachments_class = status.find('div', class_='attachments') if attachments_class is not None: - pics, vid_in_tweet = process_attachments(nitter_url, attachments_class, get_vids, toml['config']['twitter_account'], status_id, + pics, vid_in_tweet = process_attachments(nitter_url, attachments_class, toml['options']['upload_videos'], toml['config']['twitter_account'], status_id, author_account) photos.extend(pics) if vid_in_tweet: