tombulled / python-youtube-music

Python 3 YouTube Music Web API Client
GNU General Public License v3.0
64 stars 13 forks source link

Fix album information not found #14

Closed fmigneault closed 2 years ago

fmigneault commented 3 years ago

Apply changes to fetch alternative locations to populate album/tracks metadata from scrapping with recent updates from YouTube API response contents.

I would like to try solution from https://github.com/tombulled/python-youtube-music/issues/13#issuecomment-923262424 (innertube), but as it involves a lot of refactoring in my project to process all the "download" operations, this PR provides temporary workarounds.

Except some fields like explicit and description, I have been able to remap most metadata. The solution first uses the original locations each time, and falls back to the new locations if not found. There is not a "global" album_release contents in new contents. Instead, fields are gradually populated and the original album_release scrapping portion is skipped entirely when missing.

Using this approach, the full pipeline from an input album_id to a final list of videos downloaded by YouTubeMusicDL is working again, and all relevant album/artist metadata is available.

Fixes #13

tombulled commented 2 years ago

Thanks for your work on this and apologies it's taken me a while to review and merge this