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

ExtractError due to copyright restriction #9722

Closed
Phyks opened this issue Jun 7, 2016 · 2 comments
Closed

ExtractError due to copyright restriction #9722

Phyks opened this issue Jun 7, 2016 · 2 comments

Comments

@Phyks
Copy link

@Phyks Phyks commented Jun 7, 2016

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.06.03. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2016.06.03

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

When using youtube-dl embedded in a Python script, I get:

ERROR: E5ndMUBoiRE: YouTube said: This video contains content from [Merlin] PIAS, who has blocked it in your country on copyright grounds.
Traceback (most recent call last):
  File "/home/phyks/.local/share/virtualenvs/6d39af90e64ae92/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 676, in extract_info
    ie_result = ie.extract(url)
  File "/home/phyks/.local/share/virtualenvs/6d39af90e64ae92/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 341, in extract
    return self._real_extract(url)
  File "/home/phyks/.local/share/virtualenvs/6d39af90e64ae92/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1311, in _real_extract
    expected=True, video_id=video_id)
youtube_dl.utils.ExtractorError: E5ndMUBoiRE: YouTube said: This video contains content from [Merlin] PIAS, who has blocked it in your country on copyright grounds.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "youtube_playlists.py", line 109, in <module>
    result = ydl.extract_info(sys.argv[1], download=False)
  File "/home/phyks/.local/share/virtualenvs/6d39af90e64ae92/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 687, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/home/phyks/.local/share/virtualenvs/6d39af90e64ae92/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 848, in process_ie_result
    extra_info=extra)
  File "/home/phyks/.local/share/virtualenvs/6d39af90e64ae92/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 740, in process_ie_result
    extra_info=extra_info)
  File "/home/phyks/.local/share/virtualenvs/6d39af90e64ae92/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 691, in extract_info
    self.report_error(compat_str(e), e.format_traceback())
  File "/home/phyks/.local/share/virtualenvs/6d39af90e64ae92/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 550, in report_error
    self.trouble(error_message, tb)
  File "/home/phyks/.local/share/virtualenvs/6d39af90e64ae92/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 520, in trouble
    raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: E5ndMUBoiRE: YouTube said: This video contains content from [Merlin] PIAS, who has blocked it in your country on copyright grounds.

Usage is:

import youtube_dl

if __name__ == "__main__":
    with youtube_dl.YoutubeDL(ydl_opts) as ydl:
        result = ydl.extract_info(sys.argv[1], download=False)

When fetching infos from a single video file, I can easily workaround, but it seems I cannot do anything when such a video is inside a playlist.

Thanks

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 7, 2016

This is expected behavior. Add 'ignoreerrors': True to ydl_opts.

@dstftw dstftw closed this Jun 7, 2016
@Phyks
Copy link
Author

@Phyks Phyks commented Jun 7, 2016

Ok, thanks. Is there some doc about embedding youtube-dl anywhere else than https://github.com/rg3/youtube-dl#embedding-youtube-dl or should one often refer to the source code?

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
2 participants
You can’t perform that action at this time.