-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added quota testing #400
Added quota testing #400
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for you contribution! Some questions are left, but I believe we can merge this.
First, are these quotas reproducible? I.e., can you run the script multiple times with the same result? If not, what is the range for these values?
Finally, once you have obtained a range with high confidence, can you add the obtained values to a separate page in the documentation?
(ytmusic.get_tasteprofile, {}), | ||
(ytmusic.set_tasteprofile, { | ||
"artists": ["Leo Dan"], | ||
"taste_profile": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please extract this to a JSON file, it's making the code very hard to read
So for |
Don't know if you can reset it tbh. Feel free to experiment and report back, I personally never hit the limit despite doing hundreds to thousands of searches per hour (which makes sense considering the limit according to the PR is >5000) |
Certain endpoints will let you keep going without any throttle, but a few
will and it's just a cool down. I haven't looked at the project in a while
though, so things may have updated.
…On Sun, Jan 14, 2024, 4:18 PM sigma67 ***@***.***> wrote:
Don't know if you can reset it tbh. Feel free to experiment and report
back, I personally never hit the limit despite doing hundreds to thousands
of searches per hour
—
Reply to this email directly, view it on GitHub
<#400 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASKDS6BEAHVHG7QWN745LW3YORDQZAVCNFSM6AAAAAAZKOHNI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJRGA3TIOJRGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I added code for checking the quotas for each of the endpoints. Below is the output I received. I'm not sure how you want to interpret the results and where you would best like them.
Running the script
To run the script make sure to have your
oauth.json
in the main directory. Then run the commandpython3 quotas.py
Output
Testing endpoint data for search
Testing endpoint data for get_search_suggestions
Final quotas for search endpoints
search endpoint has an API quota of 5678
get_search_suggestions endpoint has an API quota of 16021
Testing endpoint data for get_home
Testing endpoint data for get_artist
Testing endpoint data for get_artist_albums
Testing endpoint data for get_album
Testing endpoint data for get_album_browse_id
Testing endpoint data for get_user
Testing endpoint data for get_user_playlists
Testing endpoint data for get_song
Testing endpoint data for get_song_related
Error occured for get_song_related
'sectionListRenderer'
Testing endpoint data for get_lyrics
Testing endpoint data for get_tasteprofile
Testing endpoint data for set_tasteprofile
Error occured for get_artist_albums
'content'
Error occured for get_user_playlists
'gridRenderer'
Final quotas for browse endpoints
get_home endpoint has an API quota of 3550
get_artist endpoint has an API quota of 9041
get_artist_albums endpoint has an API quota of 329
get_album endpoint has an API quota of 11160
get_album_browse_id endpoint has an API quota of 9410
get_user endpoint has an API quota of 11796
get_user_playlists endpoint has an API quota of 282
get_song endpoint has an API quota of 11721
get_song_related endpoint has an API quota of 0
get_lyrics endpoint has an API quota of 12103
get_tasteprofile endpoint has an API quota of 4584
set_tasteprofile endpoint has an API quota of 3527
Testing endpoint data for get_mood_categories
Testing endpoint data for get_mood_playlists
Testing endpoint data for get_charts
Error occured for get_charts
list index out of range
Error occured for get_mood_playlists
Server returned HTTP 503: Service Unavailable.
The service is currently unavailable.
Final quotas for explore endpoints
get_mood_categories endpoint has an API quota of 8476
get_mood_playlists endpoint has an API quota of 1352
get_charts endpoint has an API quota of 180
Testing endpoint data for get_watch_playlist
Final quotas for watch endpoints
get_watch_playlist endpoint has an API quota of 2593
Testing endpoint data for get_library_playlists
Testing endpoint data for get_library_songs
Testing endpoint data for get_library_albums
Testing endpoint data for get_library_artists
Testing endpoint data for get_library_subscriptions
Testing endpoint data for get_liked_songs
Testing endpoint data for get_history
Testing endpoint data for rate_song
Testing endpoint data for edit_song_library_status
Testing endpoint data for rate_playlist
Error occured for rate_playlist
Server returned HTTP 400: Bad Request.
Request contains an invalid argument.
Testing endpoint data for subscribe_artists
Testing endpoint data for unsubscribe_artists
Error occured for unsubscribe_artists
Server returned HTTP 429: Too Many Requests.
Resource has been exhausted (e.g. check quota).
Error occured for subscribe_artists
Server returned HTTP 429: Too Many Requests.
Resource has been exhausted (e.g. check quota).
Error occured for get_library_subscriptions
Server returned HTTP 500: Internal Server Error.
Internal error encountered.
Error occured for get_library_playlists
Server returned HTTP 500: Internal Server Error.
Internal error encountered.
Error occured for get_library_artists
Server returned HTTP 499: Client Closed Request.
The operation was cancelled.
Error occured for get_history
None
Final quotas for library endpoints
get_library_playlists endpoint has an API quota of 2164
get_library_songs endpoint has an API quota of 11975
get_library_albums endpoint has an API quota of 15531
get_library_artists endpoint has an API quota of 8697
get_library_subscriptions endpoint has an API quota of 4144
get_liked_songs endpoint has an API quota of 9182
get_history endpoint has an API quota of 3393
rate_song endpoint has an API quota of 18429
edit_song_library_status endpoint has an API quota of 17838
rate_playlist endpoint has an API quota of 0
subscribe_artists endpoint has an API quota of 2254
unsubscribe_artists endpoint has an API quota of 4
Testing endpoint data for get_playlist
Testing endpoint data for create_playlist
Testing endpoint data for edit_playlist
Testing endpoint data for add_playlist_items
Testing endpoint data for remove_playlist_items
Testing endpoint data for delete_playlist
Error occured for create_playlist
Server returned HTTP 400: Bad Request.
You are creating too many playlists. Please wait a while before creating further playlists.
Final quotas for playlists endpoints
get_playlist endpoint has an API quota of 7508
create_playlist endpoint has an API quota of 26
edit_playlist endpoint has an API quota of 26
add_playlist_items endpoint has an API quota of 26
remove_playlist_items endpoint has an API quota of 26
delete_playlist endpoint has an API quota of 26