From d0e447a2a6fcbfb3d9ee18e5c269e07906f5d25d Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 4 Apr 2020 16:20:39 +0200 Subject: [PATCH] ItemFix: clean up Pocket links --- morss/morss.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/morss/morss.py b/morss/morss.py index b2bfff0..76ae759 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -170,6 +170,11 @@ def ItemFix(item, feedurl='/'): item.link = parse_qs(urlparse(item.link).query)['url'][0] 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 if fnmatch(item.link, 'https://www.facebook.com/l.php?u=*'): item.link = parse_qs(urlparse(item.link).query)['u'][0]