ItemFix: clean up Pocket links

master
pictuga 2020-04-04 16:20:39 +02:00
parent e6817e01b4
commit d0e447a2a6
1 changed files with 5 additions and 0 deletions

View File

@ -170,6 +170,11 @@ def ItemFix(item, feedurl='/'):
item.link = parse_qs(urlparse(item.link).query)['url'][0] item.link = parse_qs(urlparse(item.link).query)['url'][0]
log(item.link) log(item.link)
# pocket
if fnmatch(item.link, 'https://getpocket.com/redirect?url=*'):
item.link = parse_qs(urlparse(item.link).query)['url'][0]
log(item.link)
# facebook # facebook
if fnmatch(item.link, 'https://www.facebook.com/l.php?u=*'): if fnmatch(item.link, 'https://www.facebook.com/l.php?u=*'):
item.link = parse_qs(urlparse(item.link).query)['u'][0] item.link = parse_qs(urlparse(item.link).query)['u'][0]