Compare commits

..

No commits in common. "6cd4057f9f1f1c8cda77cf8a5f272cc2bfc6319a" and "1e3418144ec973d38295a3ae83120a5ee123e5e3" have entirely different histories.

View File

@ -40,7 +40,7 @@ MAX_REC_COUNT = 50
# Set the desired verbosity of logging # Set the desired verbosity of logging
# One of logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL # One of logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL
LOGGING_LEVEL = logging.INFO LOGGING_LEVEL = logging.DEBUG
# How many seconds to wait before giving up on a download (except video download) # How many seconds to wait before giving up on a download (except video download)
HTTPS_REQ_TIMEOUT = 10 HTTPS_REQ_TIMEOUT = 10
@ -577,23 +577,21 @@ def main(argv):
) )
logging.info('Running with the following configuration:') logging.info('Running with the following configuration:')
logging.info(' Config File : ' + str(args['f'])) logging.info(' Config file : ' + str(args['f']))
logging.info(' twitter_account : ' + TOML['config']['twitter_account']) logging.info(' twitter_account : ' + TOML['config']['twitter_account'])
logging.info(' mastodon_instance : ' + TOML['config']['mastodon_instance']) logging.info(' mastodon_instance : ' + TOML['config']['mastodon_instance'])
logging.info(' mastodon_user : ' + TOML['config']['mastodon_user']) logging.info(' mastodon_user : ' + TOML['config']['mastodon_user'])
logging.info(' upload_videos : ' + str(TOML['options']['upload_videos']))
logging.info(' post_reply_to : ' + str(TOML['options']['post_reply_to'])) logging.info(' post_reply_to : ' + str(TOML['options']['post_reply_to']))
logging.info(' skip_retweets : ' + str(TOML['options']['skip_retweets'])) logging.info(' skip_retweets : ' + str(TOML['options']['skip_retweets']))
logging.info(' remove_link_redirections : ' + str(TOML['options']['remove_link_redirections'])) logging.info(' remove_link_redirections : ' + str(TOML['options']['remove_link_redirections']))
logging.info(' remove_trackers_from_urls: ' + str(TOML['options']['remove_trackers_from_urls'])) logging.info(' remove_trackers_from_urls: ' + str(TOML['options']['remove_trackers_from_urls']))
logging.info(' footer : ' + TOML['options']['footer']) logging.info(' upload_videos : ' + str(TOML['options']['upload_videos']))
logging.info(' remove_original_tweet_ref: ' + str(TOML['options']['remove_original_tweet_ref']))
logging.info(' tweet_max_age : ' + str(TOML['options']['tweet_max_age'])) logging.info(' tweet_max_age : ' + str(TOML['options']['tweet_max_age']))
logging.info(' tweet_delay : ' + str(TOML['options']['tweet_delay'])) logging.info(' tweet_delay : ' + str(TOML['options']['tweet_delay']))
logging.info(' toot_cap : ' + str(TOML['options']['toot_cap'])) logging.info(' toot_cap : ' + str(TOML['options']['toot_cap']))
logging.info(' subst_twitter : ' + str(TOML['options']['subst_twitter'])) logging.info(' twitter substitution : ' + str(TOML['options']['subst_twitter']))
logging.info(' subst_twitter : ' + str(TOML['options']['subst_youtube'])) logging.info(' youtube substitution : ' + str(TOML['options']['subst_youtube']))
logging.info(' subst_twitter : ' + str(TOML['options']['subst_reddit'])) logging.info(' reddit substitution : ' + str(TOML['options']['subst_reddit']))
# Try to open database. If it does not exist, create it # Try to open database. If it does not exist, create it
sql = sqlite3.connect('twoot.db') sql = sqlite3.connect('twoot.db')
@ -648,7 +646,7 @@ def main(argv):
twit_account_page.status_code) + '). Aborting') twit_account_page.status_code) + '). Aborting')
exit(-1) exit(-1)
logging.debug('Nitter page downloaded successfully from ' + url) logging.info('Nitter page downloaded successfully from ' + url)
# DEBUG: Save page to file # DEBUG: Save page to file
# of = open(toml['config']['twitter_account'] + '.html', 'w') # of = open(toml['config']['twitter_account'] + '.html', 'w')