added new nitter instance

This commit is contained in:
jeancf 2023-06-15 15:04:43 +02:00
parent c306187196
commit 7e4a7d8576

View File

@ -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']))