forked from rDrama/rDrama
1
0
Fork 0

Revert "jump in reddit urls"

This reverts commit f4251d6026.
master
Aevann 2024-03-10 20:48:32 +02:00
parent 8011e1ae41
commit 0af8d6e946
1 changed files with 3 additions and 7 deletions

View File

@ -788,12 +788,8 @@ def normalize_url(url):
domain = tldextract.extract(netloc).registered_domain
filtered |= {k: val for k, val in qd.items() if not val[0] or is_whitelisted(domain, k)}
hash = ''
if netloc == 'old.reddit.com':
x = reddit_comment_link_regex.search(url)
if x:
filtered['context'] = 8
hash = x.group(1).replace('/', '#thing_t1_')
if netloc == 'old.reddit.com' and reddit_comment_link_regex.fullmatch(url):
filtered['context'] = 8
new_url = ParseResult(scheme="https",
netloc=netloc,
@ -801,7 +797,7 @@ def normalize_url(url):
params=parsed_url.params,
query=urlencode(filtered, doseq=True),
fragment=parsed_url.fragment)
url = urlunparse(new_url) + hash
url = urlunparse(new_url)
domain = tldextract.extract(url).registered_domain