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

YouTube said: <a href ... #12035

Closed
Khang-NT opened this issue Feb 9, 2017 · 3 comments
Closed

YouTube said: <a href ... #12035

Khang-NT opened this issue Feb 9, 2017 · 3 comments

Comments

@Khang-NT
Copy link
Contributor

@Khang-NT Khang-NT commented Feb 9, 2017

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.02.07. 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 2017.02.07

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

$ youtube-dl -j u9Crsd1Z90k -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-j', 'u9Crsd1Z90k', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.02.07
[debug] Python version 3.5.2 - Darwin-16.4.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.1.3, ffprobe 3.1.3
[debug] Proxy map: {}
ERROR: u9Crsd1Z90k: YouTube said: <a href="http://www.youtube.com/watch?v=u9Crsd1Z90k&feature=player_embedded" target="_blank">Watch this video on YouTube.</a>
Playback on other websites has been disabled by the video owner.
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 696, in extract_info
    ie_result = ie.extract(url)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 369, in extract
    return self._real_extract(url)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1385, in _real_extract
    expected=True, video_id=video_id)
youtube_dl.utils.ExtractorError: u9Crsd1Z90k: YouTube said: <a href="http://www.youtube.com/watch?v=u9Crsd1Z90k&feature=player_embedded" target="_blank">Watch this video on YouTube.</a>
Playback on other websites has been disabled by the video owner.

No idea for this error, maybe some cases haven't handled yet.

@ThomasChr
Copy link
Contributor

@ThomasChr ThomasChr commented Feb 9, 2017

Same problem here.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 9, 2017

This video requires authentication.

@dstftw dstftw closed this Feb 9, 2017
@Khang-NT
Copy link
Contributor Author

@Khang-NT Khang-NT commented Feb 9, 2017

YouTube-DL detects age-restricted content, but when I skip this check, it works without problem.

So I think, it's better to skip the step handle "age-restricted content" if possible.
https://github.com/Khang-NT/youtube-dl/blob/master/youtube_dl/extractor/youtube.py#L1305-L1376

To do that, just do "get video info" first. Then if "get video info" success, we can skip "age-restricted" block.

if not video_info and re.search(r'player-age-gate-content">', video_webpage) is not None:
     ...

Is it correct?

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