Redirect google translate links to original link
Cause anyway Google Translate isn't scrappable. So it's better to have at least some content.master
parent
a4cf5e0daa
commit
d8074d6b6d
|
@ -360,6 +360,11 @@ def Fix(item, feedurl='/'):
|
||||||
# check relative urls
|
# check relative urls
|
||||||
item.link = urlparse.urljoin(feedurl, item.link)
|
item.link = urlparse.urljoin(feedurl, item.link)
|
||||||
|
|
||||||
|
# google translate
|
||||||
|
if fnmatch(item.link, 'http://translate.google.*/translate*u=*'):
|
||||||
|
item.link = urlparse.parse_qs(urlparse.urlparse(item.link).query)['u'][0]
|
||||||
|
log(item.link)
|
||||||
|
|
||||||
# google
|
# google
|
||||||
if fnmatch(item.link, 'http://www.google.*/url?q=*'):
|
if fnmatch(item.link, 'http://www.google.*/url?q=*'):
|
||||||
item.link = urlparse.parse_qs(urlparse.urlparse(item.link).query)['q'][0]
|
item.link = urlparse.parse_qs(urlparse.urlparse(item.link).query)['q'][0]
|
||||||
|
|
Loading…
Reference in New Issue