From d8a3c4e9af55d44011ad3a8506f71bee8398fc69 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 18 May 2014 11:58:45 +0200 Subject: [PATCH] Add support for Google News --- morss/morss.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/morss/morss.py b/morss/morss.py index fd6da72..f7debd2 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -363,6 +363,11 @@ def Fix(item, feedurl='/'): item.link = urlparse.parse_qs(urlparse.urlparse(item.link).query)['q'][0] log(item.link) + # google news + if fnmatch(item.link, 'http://news.google.com/news/url*url=*'): + item.link = urlparse.parse_qs(urlparse.urlparse(item.link).query)['url'][0] + log(item.link) + # facebook if fnmatch(item.link, 'https://www.facebook.com/l.php?u=*'): item.link = urlparse.parse_qs(urlparse.urlparse(item.link).query)['u'][0]