Skip to content
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

brightcove "forbidden by access policy", but not georestricted #15486

Closed
Geremia opened this issue Feb 4, 2018 · 1 comment
Closed

brightcove "forbidden by access policy", but not georestricted #15486

Geremia opened this issue Feb 4, 2018 · 1 comment

Comments

@Geremia
Copy link

@Geremia Geremia commented Feb 4, 2018

http://iopscience.iop.org/bookListInfo/schwalm-videos is not georestricted for me (I can watch the videos just fine in my browser), but youtube-dl cannot batch download them. I've tried supplying cookies.txt from my browser, but youtube-dl still gives the same error.

The form of the URLs for the segments of the first video of http://iopscience.iop.org/bookListInfo/schwalm-videos is:

http://f1.media.brightcove.com/3/105920850001/4666773337001/105920850001_4666773337001_s-*.ts

I passed such URLs to youtube-dl, and it can download these *.ts files. But when I pass http://iopscience.iop.org/bookListInfo/schwalm-videos, it gives this error:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'http://iopscience.iop.org/bookListInfo/schwalm-videos']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.02.03
[debug] Python version 3.6.4 (CPython) - Linux-4.14.16-x86_64-Intel-R-_Core-TM-_i5-2410M_CPU_@_2.30GHz-with-slackware-14.2
[debug] exe versions: ffmpeg 3.4.1, ffprobe 3.4.1, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[generic] schwalm-videos: Requesting header
WARNING: Falling back on generic information extractor.
[generic] schwalm-videos: Downloading webpage
[generic] schwalm-videos: Extracting information
[download] Downloading playlist: Lectures on Selected Topics in Mathematical Physics: Elliptic Functions and Elliptic Integrals - Books - IOPscience
[generic] playlist Lectures on Selected Topics in Mathematical Physics: Elliptic Functions and Elliptic Integrals - Books - IOPscience: Collected 6 video ids (downloading 6 of them)
[download] Downloading video 1 of 6
[brightcove:new] 4666542687001: Downloading webpage
[brightcove:new] 4666542687001: Downloading JSON metadata
ERROR: Access to this resource is forbidden by access policy.
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/common.py", line 517, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 2198, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/brightcove.py", line 695, in _real_extract
    'Accept': 'application/json;pk=%s' % policy_key
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/common.py", line 678, in _download_json
    encoding=encoding, data=data, headers=headers, query=query)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/common.py", line 632, in _download_webpage
    res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding, data=data, headers=headers, query=query)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/adobepass.py", line 1332, in _download_webpage_handle
    *args, **compat_kwargs(kwargs))
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/common.py", line 537, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/common.py", line 526, in _request_webpage
    raise ExtractorError(errmsg, sys.exc_info()[2], cause=err)
youtube_dl.utils.ExtractorError: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/common.py", line 517, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 2198, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/brightcove.py", line 695, in _real_extract
    'Accept': 'application/json;pk=%s' % policy_key
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/common.py", line 678, in _download_json
    encoding=encoding, data=data, headers=headers, query=query)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/common.py", line 632, in _download_webpage
    res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding, data=data, headers=headers, query=query)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/adobepass.py", line 1332, in _download_webpage_handle
    *args, **compat_kwargs(kwargs))
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/common.py", line 537, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/common.py", line 526, in _request_webpage
    raise ExtractorError(errmsg, sys.exc_info()[2], cause=err)
youtube_dl.utils.ExtractorError: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 784, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/common.py", line 438, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/brightcove.py", line 703, in _real_extract
    raise ExtractorError(message, expected=True)
youtube_dl.utils.ExtractorError: Access to this resource is forbidden by access policy.
@dstftw dstftw closed this in b57e64a Feb 4, 2018
dstftw added a commit that referenced this issue Feb 4, 2018
dstftw added a commit that referenced this issue Feb 4, 2018
@Geremia
Copy link
Author

@Geremia Geremia commented Feb 4, 2018

@dstftw I tested your patch, and it worked.
thanks for the quick fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.