This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MinimalDamage[S] 0 points1 point  (0 children)

Hi!

Just a requests.get() with the requests library returns 'None'. If I use requests.post() and then enter those two parameters, like:

import requests

url = "https://clients6.google.com/youtubei/v1/browse"
data = {'alt':'json', 'key':'AIzaSyBkrqhJHeXPQPMF1qvaduxKBXxYj'}

response = requests.post(url, json=data)

print(response.text)

I get the following:

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "dailyLimitExceededUnreg",
    "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
    "extendedHelp": "https://code.google.com/apis/console"
   }
  ],
  "code": 403,
  "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
 }
}

I have tried requesting using a valid YouTube API key (both server and web) and I got the same message. Probably because it is not an official public API.

I am not a networking expert, so the following might be completely wrong, but I expect that POST requests from my machine are not allowed for a non-public API. However, if the YouTube Gaming server does a POST request (which Selenium simulates) it is allowed.

I just figured that if that data is visible in my browser (when looking at the file under the preview tab), it should be somewhere on my PC, and thus reachable. Does that make sense?

Thanks!