From 7e4a7d8576e30087552183445142a2b14ddaa8c9 Mon Sep 17 00:00:00 2001 From: jeancf Date: Thu, 15 Jun 2023 15:04:43 +0200 Subject: [PATCH] added new nitter instance --- twoot.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/twoot.py b/twoot.py index 79b2de8..9af3d24 100755 --- a/twoot.py +++ b/twoot.py @@ -42,13 +42,14 @@ MAX_REC_COUNT = 50 HTTPS_REQ_TIMEOUT = 10 NITTER_URLS = [ - 'https://nitter.lacontrevoie.fr', # rate limited + 'https://nitter.lacontrevoie.fr', 'https://n.l5.ca', - # 'https://nitter.it', # different pic naming scheme 'https://nitter.sethforprivacy.com', # added on 01/06/2023 'https://nitter.cutelab.space', # USA, added 16/02/2023 + 'https://nitter.weiler.rocks', # added 15/06/2023 'https://nitter.fly.dev', # anycast, added 06/02/2023 'https://notabird.site', # anycast, added 06/02/2023 + # 'https://nitter.it', # different pic naming scheme # 'https://twitter.femboy.hu', # 404 on 06/05/2023 # 'https://nitter.grimneko.de', # 404 on 01/06/2023 # 'https://nitter.namazso.eu', # lots of 403 27/02/2023 @@ -186,6 +187,8 @@ def update_profile(nitter_url, soup, sql, mast_password): # Check if TOML option to update profile is set if TOML['options']['update_profile'] is False: return None + else: + logging.debug("Checking twitter profile for changes") db = sql.cursor() @@ -252,6 +255,8 @@ def update_profile(nitter_url, soup, sql, mast_password): db.execute("UPDATE profiles SET avatar_url=?, banner_url=? WHERE mastodon_instance=? AND mastodon_account=?", (new_avatar_url, new_banner_url, TOML['config']['mastodon_instance'], TOML['config']['mastodon_user'])) sql.commit() logging.debug("updated profile on database") + else: + logging.debug("No changes to profile found") return mastodon @@ -769,6 +774,7 @@ def main(argv): logging.info(' remove_trackers_from_urls: ' + str(TOML['options']['remove_trackers_from_urls'])) logging.info(' footer : ' + TOML['options']['footer']) logging.info(' remove_original_tweet_ref: ' + str(TOML['options']['remove_original_tweet_ref'])) + logging.info(' update_profile : ' + str(TOML['options']['update_profile'])) logging.info(' tweet_max_age : ' + str(TOML['options']['tweet_max_age'])) logging.info(' tweet_delay : ' + str(TOML['options']['tweet_delay'])) logging.info(' toot_cap : ' + str(TOML['options']['toot_cap']))