Closed PelicanSL closed 7 months ago
This is hard to debug without the actual JSON data being returned for you. You can retrieve it via the POST requests when navigating to the charts page on YouTube Music.
Screenshots may help as well.
I know YouTube Music has been doing A/B tests lately on that page because I've been affected as well (the Trending category stopped showing up for a while, but now it's back).
I can confirm this issue with ytmusicapi 1.5.2.; As the issue does not appear in branch fix-548 it appears to have been caused by the modifications in ytmusic 1.5.2 which have been reverted in that branch.
@PelicanSL can you check with 1.5.3 and close if fixed?
Description When using the get_charts method from ytmusicapi, specifying the global country code "ZZ" works as expected and returns chart data without issues. However, attempting to use any other country code (e.g., "ES", "US", "FR", "EN") results in a KeyError for 'musicResponsiveListItemRenderer'. This issue occurs across different country codes, suggesting a problem with handling responses for specific countries other than the global charts.
To Reproduce: Steps to reproduce the behavior:
Expected Behavior: The expected behavior is for the get_charts method to return chart data for the specified country without raising an error, similar to how it behaves with the global country code "ZZ".
Actual Behavior: A KeyError is raised for 'musicResponsiveListItemRenderer', indicating a failure to parse the API response for non-global country codes.
Error Message:
Additional Context:
Code Sample:
I have the library updated to version 1.5.2, and the issue persists across various non-global country codes, indicating a broader problem with handling country-specific chart data.
Thanks!!