diff --git a/PyLyrics/functions.py b/PyLyrics/functions.py index e4c7e19..72b6741 100644 --- a/PyLyrics/functions.py +++ b/PyLyrics/functions.py @@ -41,7 +41,7 @@ class PyLyrics: @staticmethod def getAlbums(singer): singer = singer.replace(' ', '_') - s = BeautifulSoup(requests.get('http://lyrics.wikia.com/{0}'.format(singer)).text) + s = BeautifulSoup(requests.get('http://lyrics.wikia.com/{0}'.format(singer)).text, "html.parser") spans = s.findAll('span',{'class':'mw-headline'}) als = [] @@ -60,7 +60,7 @@ def getAlbums(singer): @staticmethod def getTracks(album): url = "http://lyrics.wikia.com/api.php?action=lyrics&artist={0}&fmt=xml".format(album.artist()) - soup = BeautifulSoup(requests.get(url).text) + soup = BeautifulSoup(requests.get(url).text, "html.parser") for al in soup.find_all('album'): if al.text.lower().strip() == album.name.strip().lower(): @@ -107,4 +107,4 @@ def main(): if __name__=='__main__': - main() \ No newline at end of file + main()