youtube-data-api - YouTube API takes minutes now - instead of seconds
问题描述
I have a Perl script which uses LWP::UserAgent
to retrieve a YouTube video's information via an HTTPS request. The script normally would take 2-3 seconds to retrieve three separate HTTPS requests. Now, it takes 15-20 minutes.
I wrote a similar script in Python where I use the following:
import google_auth_oauthlib.flow
import googleapiclient.discovery
import googleapiclient.errors
And this one request is taking 5-7 minutes.
Then - on Thursday night - the Perl script went back to only taking 2-3 seconds. This lasted for a few hours, and now the time is back to taking 15-20 minutes. The script seems to take forever on the HTTPS call - and not during any other time of the script.
If I take the HTTPS URL and put it in a web browser, it takes less than a second.
The script is over 2,000 lines long, so I can't post it here. But, all I am doing is trying to retrieve:
https://www.googleapis.com/youtube/v3/videos?part=statistics&key=$key&id=$video_comments_to_get
,
where $key
is my authorization key, and $video_comments_to_get
is the 11 character YouTube video ID value.
This all started after YouTube's outage on November 11th. Any ideas why this would be taking so long? I only run this script 10-15 times a day - so it isn't like I am over my quota.
解决方案
推荐阅读
- android - Android:无法转换为 java.lang.CharSequence
- azure - Azure AD:如何将用户重定向到特定页面
- javascript - HTML中的画布以适合带有Javascript的监视器屏幕不起作用,因为我仍然看到X和Y的滚动条
- android - 如何在 kotlin 语言中使用 Httppost.setEntity?
- c# - C#泛型中带有类型参数的类型参数
- javascript - 如何使用 .roundSlider() 在每个元素下方显示当前值?
- android-studio - Android Studio 无法正确打开
- r - 无法在 R 版本 4.0.2 中安装 nonparaeff 包
- java - java中具有最小和最大聚合的范围聚合
- python-3.x - Python enum.Enum:创建我可以分配 enum.Enum 成员的变量