YouTube error HTTP 429 - Too Many Requests

。_饼干妹妹 提交于 2020-07-03 10:05:22

问题


I have some php code that fetches a youtube link and then gets its thumbnail. For that I am using this:

$str = file_get_contents(youtubelink);

But I am getting this error sometimes:

Warning: file_get_contents(https://www.youtube.com/watch?v=urA28s-OGW0):     failed to open stream: HTTP request failed! HTTP/1.0 429 Too Many Requests in /home/mps/public_html/ajax/file.php on line 34

What is causing this error? How can I get rid of it? What's the limit I can access?


回答1:


They are probably blocking you. They have an API to use, https://developers.google.com/youtube/v3/.



来源:https://stackoverflow.com/questions/28918835/youtube-error-http-429-too-many-requests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!