Closed brandhsu closed 4 years ago
Thanks @Brandhsu, I will do my best to solve this issue ASAP.
I tested azapi and I found that in tools.py
inside ParseSongs
function, I wrote this within the main loop over listAlbum
items:
...
if elmnt.name == 'script':
break
...
And because AZLyrics.com updated their website with new Google Ads mechanism which now exists between songs under listAlbum
dev and uses a script
tag, the loop terminates itself when facing the first Google Ad causing many songs not to be included.
Problem was fixed when this code is removed.
I will update azapi to v3.0.3 ASAP
Now pip install azapi==3.0.3
to fix your issue :)
Describe the bug getSongs() fails to retrieve all songs from an artist
To Reproduce
printed json
Expected behavior When going to the url: https://www.azlyrics.com/b/bangtanboys.html we can see how songs have been chopped off in the print statement when compared to the actual list of songs on AZlyrics.com. I believe this issue has to do the the ParseSongs() method in tools.py. AZlyrics seems to include google adds in one under a certain div tag and I think this is causing early termination possibly.
Screenshots
Desktop (please complete the following information): Using macOS Majove
Additional context Add any other context about the problem here.