strip google redirects
This commit is contained in:
parent
860ef01776
commit
6aea07cdc8
|
@ -37,6 +37,8 @@ class WikiLeaf(callbacks.Plugin):
|
|||
soup = BeautifulSoup(data.text)
|
||||
elements = soup.select('.r a')
|
||||
url = elements[0]['href']
|
||||
url = re.sub("http://www.google.com/url?url=", "", url)
|
||||
url = re.sub("&rct=.*", "", url)
|
||||
except Exception:
|
||||
return
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue