strip google redirects

This commit is contained in:
Gordon Shumway 2019-04-11 00:01:44 -04:00 committed by GitHub
parent 91cd938cb6
commit 860ef01776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -38,6 +38,7 @@ class Lyrics(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)
title = soup.find("h3").getText()
except Exception:
return