Compare commits

...

3 Commits

Author SHA1 Message Date
jeancf
5ecc8bd634 Improved comments 2023-01-31 22:22:49 +01:00
jeancf
0db62a1906 added "utm_brand" to blacklist 2023-01-31 22:13:30 +01:00
jeancf
92a60e2fad Fix bug in remove_link_redirections 2023-01-31 21:58:07 +01:00
2 changed files with 6 additions and 5 deletions

View File

@ -50,19 +50,19 @@ tweet_delay = 0
# Default is 0 (which means unlimited) # Default is 0 (which means unlimited)
toot_cap = 0 toot_cap = 0
# Replace twitter links by random alternative out of this list # Replace twitter.com in links by random alternative out of this list
# List of nitter instances # List of nitter instances
# e.g. subst_twitter = ["nitter.net", ] # e.g. subst_twitter = ["nitter.net", ]
# Default is [] # Default is []
subst_twitter = [] subst_twitter = []
# Replace youtube.com link by random alternative out of this list # Replace youtube.com in links by random alternative out of this list
# List of Invidious or Piped instances # List of Invidious or Piped instances
# e.g. subst_youtube = ["piped.kavin.rocks", "invidious.flokinet.to", ] # e.g. subst_youtube = ["piped.kavin.rocks", "invidious.flokinet.to", ]
# Default is [] # Default is []
subst_youtube = [] subst_youtube = []
# Replace reddit.com link by random alternative out of this list # Replace reddit.com in links by random alternative out of this list
# List of Teddit instances # List of Teddit instances
# e.g. subst_reddit = ["teddit.net", ] # e.g. subst_reddit = ["teddit.net", ]
# Default is [] # Default is []

View File

@ -187,7 +187,7 @@ def deredir_url(url):
ret = None ret = None
try: try:
# Download the page # Download the page
ret = requests.head(url, headers=headers, timeout=5) ret = requests.head(url, headers=headers, allow_redirects=True, timeout=5)
except: except:
# If anything goes wrong keep the URL intact # If anything goes wrong keep the URL intact
return url return url
@ -213,7 +213,8 @@ def _remove_trackers_query(query_str):
# tags by Facebook # tags by Facebook
params_to_remove = { params_to_remove = {
"gclid", "_ga", "gclsrc", "dclid", "gclid", "_ga", "gclsrc", "dclid",
"utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content", "utm_cid", "utm_reader", "utm_name", "utm_referrer", "utm_social", "utm_social-type", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content", "utm_cid",
"utm_reader", "utm_name", "utm_referrer", "utm_social", "utm_social-type", "utm_brand"
"mkt_tok", "mkt_tok",
"campaign_name", "ad_set_name", "campaign_id", "ad_set_id", "campaign_name", "ad_set_name", "campaign_id", "ad_set_id",
"fbclid", "campaign_name", "ad_set_name", "ad_set_id", "media", "interest_group_name", "ad_set_id" "fbclid", "campaign_name", "ad_set_name", "ad_set_id", "media", "interest_group_name", "ad_set_id"