yt
yt copied to clipboard
Reaching 10000 quotas request with 100 for Yt::Collections::Videos.new.where(q: "title ", max_results: 1).first
I have a Quota for 10.000 queries a day,
but it seems weird that Yt::Collections::Videos.new.where(q: "title ", max_results: 1).first reaches it after 100 requests.
Is there another way to do a search request that doesn't do that much queries ?
I am facing the same issue.
I am trying to identify where that 100 quota consumption comes from.
Based on the data provided here https://developers.google.com/youtube/v3/determine_quota_cost, I think the query the gem does refer to search -> list that has a cost of 100.
Can you show us the curl commands when you do Yt::Collections::Videos.new.where(q: "title ", max_results: 1).first? You can see them if you set log level "devel"
Yt::Collections::Videos.new(auth: account).where(q: "title ", max_results: 1).first
I just tried this (I was curious) and it made only 1 request as below. I couldn't get 100 requests @gkosmo
curl -X GET -H "content-length: 0" -H "user-agent: Yt::Request (gzip)" -H "authorization: Bearer ya29.token"
"https://www.googleapis.com/youtube/v3/search?maxResults=1&order=date&part=snippet&q=title+&type=video"
closing for now. feel free to reopen if anything.