-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TVer] Trying to download from this site gives a time out on brightcove's part #10199
Comments
Could you try running this:
|
I did just run the line you mentioned, but it's giving me the same time out error. I could drop in the verbose log again if you would like to take a look. |
Sure, I'll always take a verbose log. How about does this one work for you:
You mentioned you are using a VPN. What if you don't use any VPN/proxy? |
I'll give you the verbose of the first line you recommended: `[debug] Command-line config: ['-vU', 'yt-dlp', '-v', 'https://players.brightcove.net/4394098882001/default_default/index.html?videoId=ref:c741b3554c65468c832ff3457d8c74e4#__youtubedl_smuggle=%7B%22geo_countries%22%3A+%5B%22JP%22%5D%7D'] [brightcove:new] Extracting URL: https://players.brightcove.net/4394098882001/default_default/index.html?videoId=ref:c741b3554c65468c832ff3457d8c74e4#__youtubedl_smuggle=%7B%22geo_countries%22%3A+%5B%22JP%22%5D%7D File "urllib3\connectionpool.py", line 537, in _make_request The above exception was the direct cause of the following exception: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): And here's the verbose of the second line: `[debug] Command-line config: ['-v', 'https://players.brightcove.net/4394098882001/default_default/index.html?videoId=ref:c741b3554c65468c832ff3457d8c74e4'] File "urllib3\connectionpool.py", line 537, in _make_request The above exception was the direct cause of the following exception: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): There doesn't seem to be a difference, is it?
yt-dlp straight up won't work, it'll say the site is geo locked if I don't use a VPN in Japan. |
@GT2000byte if you want to try one more thing, you could do this:
|
Okay, running the patched pre-release worked, the video is downloading just like it used to. It seems like said patch fixed whatever error is happening with the current stable release. Thank you! |
What the patch did was upgrade all of the Brightcove extractor's requests to HTTPS: diff --git a/yt_dlp/extractor/brightcove.py b/yt_dlp/extractor/brightcove.py
index dc0c83572..56d74764f 100644
--- a/yt_dlp/extractor/brightcove.py
+++ b/yt_dlp/extractor/brightcove.py
@@ -386,7 +386,7 @@ def _build_brightcove_url_from_js(cls, object_js):
@classmethod
def _make_brightcove_url(cls, params):
return update_url_query(
- 'http://c.brightcove.com/services/viewer/htmlFederated', params)
+ 'https://c.brightcove.com/services/viewer/htmlFederated', params)
@classmethod
def _extract_brightcove_url(cls, webpage):
@@ -470,7 +470,7 @@ def _real_extract(self, url):
if referer:
headers['Referer'] = referer
player_page = self._download_webpage(
- 'http://link.brightcove.com/services/player/bcpid' + player_id[0],
+ 'https://link.brightcove.com/services/player/bcpid' + player_id[0],
video_id, headers=headers, fatal=False)
if player_page:
player_key = self._search_regex(
@@ -480,7 +480,7 @@ def _real_extract(self, url):
enc_pub_id = player_key.split(',')[1].replace('~', '=')
publisher_id = struct.unpack('>Q', base64.urlsafe_b64decode(enc_pub_id))[0]
if publisher_id:
- brightcove_new_url = f'http://players.brightcove.net/{publisher_id}/default_default/index.html?videoId={video_id}'
+ brightcove_new_url = f'https://players.brightcove.net/{publisher_id}/default_default/index.html?videoId={video_id}'
if referer:
brightcove_new_url = smuggle_url(brightcove_new_url, {'referrer': referer})
return self.url_result(brightcove_new_url, BrightcoveNewIE.ie_key(), video_id)
@@ -801,7 +801,7 @@ def _extract_brightcove_urls(ie, webpage):
# Look for iframe embeds [1]
for _, url in re.findall(
r'<iframe[^>]+src=(["\'])((?:https?:)?//players\.brightcove\.net/\d+/[^/]+/index\.html.+?)\1', webpage):
- entries.append(url if url.startswith('http') else 'http:' + url)
+ entries.append(url if url.startswith(('http:', 'https:')) else 'https:' + url)
# Look for <video> tags [2] and embed_in_page embeds [3]
# [2] looks like:
@@ -830,7 +830,7 @@ def _extract_brightcove_urls(ie, webpage):
player_id = player_id or attrs.get('data-player') or 'default'
embed = embed or attrs.get('data-embed') or 'default'
- bc_url = f'http://players.brightcove.net/{account_id}/{player_id}_{embed}/index.html?videoId={video_id}'
+ bc_url = f'https://players.brightcove.net/{account_id}/{player_id}_{embed}/index.html?videoId={video_id}'
# Some brightcove videos may be embedded with video tag only and
# without script tag or any mentioning of brightcove at all. Such
@@ -867,7 +867,7 @@ def _real_extract(self, url):
store_pk = lambda x: self.cache.store('brightcove', policy_key_id, x)
def extract_policy_key():
- base_url = f'http://players.brightcove.net/{account_id}/{player_id}_{embed}/'
+ base_url = f'https://players.brightcove.net/{account_id}/{player_id}_{embed}/'
config = self._download_json(
base_url + 'config.json', video_id, fatal=False) or {}
policy_key = try_get( |
Nightly has the patch now:
|
Thank you. I'll probably update yt-dlp to the Nightly releases for now |
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Region
Japan
Provide a description that is worded well enough to be understood
I've been trying to download a show from this site for some time. The problem seems to be with brightcove and giving time out errors whenever trying to doing a download, the weird thing is the video does play correctly on my browser. I've also tried other VPN services in case the one I regularly use gives the problem, but it still refuses to download said video.
Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output
The text was updated successfully, but these errors were encountered: