Třeba tohle:
GET https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet&id=DtXPGqeorOA
(tučně je ID youtube videa)
vrátí to JSON a v něm je array items[0].contentDetails.regionRestriction.blocked s kódy zemí, kde to je blokováno
Delam neco spatne, a nebo neco zmenili?
Treba dnesni vecerni zapas.
https://www.youtube.com/watch?app=desktop&v=bbkHqGEEOnchttps://www.youtube.com/watch?v=bbkHqGEEOnchttps://www.youtube.com/live/bbkHqGEEOnchttps://youtu.be/live/bbkHqGEEOnchttps://youtu.be/bbkHqGEEOncGET
https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet&id=DtXPGqeorOATakze zkousim GET s cURL:
curl
https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet&id=bbkHqGEEOncA hlasi mi to ze mi chybu API klic
"error": {
"code": 403,
"message": "The request is missing a valid API key.",
"errors": [
{
"message": "The request is missing a valid API key.",
"domain": "global",
"reason": "forbidden"
}
],
"status": "PERMISSION_DENIED"
}
}
Takze koukam do F12 - key a je tam jen jeden .......
https://www.youtube.com/youtubei/v1/player/heartbeat?alt=json&key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8KOukam na ten format, zkousim jeste pridat klic za ten pozadavek
curl "
https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet&id=bbkHqGEEOnc?alt=json&key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"
Odpoved je:
{
"error": {
"code": 403,
"message": "YouTube Data API v3 has not been used in project 144809266352 before or it is disabled. Enable it by visiting
https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=144809266352 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"errors": [
{
"message": "YouTube Data API v3 has not been used in project 144809266352 before or it is disabled. Enable it by visiting
https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=144809266352 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"domain": "usageLimits",
"reason": "accessNotConfigured",
"extendedHelp": "
https://console.developers.google.com"
}
],
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "
https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=144809266352"
}
]
},
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"service": "youtube.googleapis.com",
"consumer": "projects/144809266352"
}
}
]
}
}
Delam to zpravne?
Poradi nekdo?