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

[-i mode insufficent] ExtractorError: This video is unavailable. (previous answer still incorrect) #17287

Closed
Cokemonkey11 opened this issue Aug 20, 2018 · 8 comments

Comments

@Cokemonkey11
Copy link

@Cokemonkey11 Cokemonkey11 commented Aug 20, 2018

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

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

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 RDEMww6ZEHgLhQ-8eu_x7Z-FJw -v -i -f m4a --restrict-filenames --no-mtime -o '%(epoch)s.%(id)s.%(title).40s.%(ext)s'

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'RDEMww6ZEHgLhQ-8eu_x7Z-FJw', u'-v', u'-i', u'-f', u'm4a', u'--restrict-filenames', u'--no-mtime', u'-o', u'%(epoch)s.%(id)s.%(title).40s.%(ext)s']
[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8
[debug] youtube-dl version 2018.08.04
[debug] Python version 2.7.9 (CPython) - Linux-4.4.38-v7+-armv7l-with-debian-8.0
[debug] exe versions: avconv 11.12-6, avprobe 11.12-6
[debug] Proxy map: {}
WARNING: Unable to extract video title
ERROR: This video is unavailable.
Traceback (most recent call last):
 File \"/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py\", line 792, in extract_info
 ie_result = ie.extract(url)
 File \"/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py\", line 502, in extract
 ie_result = self._real_extract(url)
 File \"/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py\", line 1886, in _real_extract
 raise ExtractorError(error_message, expected=True)
ExtractorError: This video is unavailable.

The response in #17286 (comment) is still insufficient.

Contributor requests that I compare lhs to rhs.

As shown in logs, here is what is passed:

youtube-dl RDEMww6ZEHgLhQ-8eu_x7Z-FJw -v -i -f m4a --restrict-filenames --no-mtime -o '%(epoch)s.%(id)s.%(title).40s.%(ext)s'

Verbose mode confirms it's using: u'RDEMww6ZEHgLhQ-8eu_x7Z-FJw'

And here is the original URI: https://www.youtube.com/watch?v=kXYiU_JCYtU&start_radio=1&list=RDEMww6ZEHgLhQ-8eu_x7Z-FJw

RDEMww6ZEHgLhQ-8eu_x7Z-FJw
RDEMww6ZEHgLhQ-8eu_x7Z-FJw
RDEMww6ZEHgLhQ-8eu_x7Z-FJw

These are all identical.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 20, 2018

> py -3.6 .\youtube_dl\__main__.py RDEMww6ZEHgLhQ-8eu_x7Z-FJw -v -i -f m4a --restrict-filenames --no-mtime -o '%(epoch)s.%(id)s.%(title).40s.%(ext)s'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['RDEMww6ZEHgLhQ-8eu_x7Z-FJw', '-v', '-i', '-f', 'm4a', '--restrict-filenames', '--no-mtime', '-o', '%(epoch)s.%(id)s.%(title).40s.%(ext)s']
[debug] Encodings: locale cp1251, fs utf-8, out utf-8, pref cp1251
[debug] youtube-dl version 2018.08.04
[debug] Git HEAD: bf1245d
[debug] Python version 3.6.4 (CPython) - Windows-10-10.0.10240-SP0
[debug] exe versions: ffmpeg N-85653-gb4330a0, ffprobe N-85653-gb4330a0, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube:playlist] RDEMww6ZEHgLhQ-8eu_x7Z-FJw: Downloading page 1 of Youtube mix
[youtube:playlist] RDEMww6ZEHgLhQ-8eu_x7Z-FJw: Downloading page 2 of Youtube mix
[youtube:playlist] RDEMww6ZEHgLhQ-8eu_x7Z-FJw: Downloading page 3 of Youtube mix
[youtube:playlist] RDEMww6ZEHgLhQ-8eu_x7Z-FJw: Downloading page 4 of Youtube mix
[youtube:playlist] RDEMww6ZEHgLhQ-8eu_x7Z-FJw: Downloading page 5 of Youtube mix
[youtube:playlist] RDEMww6ZEHgLhQ-8eu_x7Z-FJw: Downloading page 6 of Youtube mix
[download] Downloading playlist: Mix - Linkin Park
[youtube:playlist] playlist Mix - Linkin Park: Collected 110 video ids (downloading 110 of them)
[download] Downloading video 1 of 110
[youtube] 8eu_x7Z-FJw: Downloading webpage
[youtube] 8eu_x7Z-FJw: Downloading video info webpage
WARNING: Unable to extract video title
ERROR: This video is unavailable.
Traceback (most recent call last):
  File "C:\Dev\youtube-dl\master\youtube_dl\YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "C:\Dev\youtube-dl\master\youtube_dl\extractor\common.py", line 502, in extract
    ie_result = self._real_extract(url)
  File "C:\Dev\youtube-dl\master\youtube_dl\extractor\youtube.py", line 1888, in _real_extract
    raise ExtractorError(error_message, expected=True)
youtube_dl.utils.ExtractorError: This video is unavailable.

[download] Downloading video 2 of 110
[youtube] kXYiU_JCYtU: Downloading webpage
[youtube] kXYiU_JCYtU: Downloading video info webpage
[youtube] {43} signature length 0.0.85, html5 player vflbOM9Vw
...
@Cokemonkey11
Copy link
Author

@Cokemonkey11 Cokemonkey11 commented Aug 20, 2018

You tried to reproduce using python 3.6, but my logs indicate 2.7

On one hand that could be a triviality, but on the other hand, encoding can be tricky. Certainly, logs indicate working with unicode-buffer in my log, and not so in yours.

Is python 2.7 not supported?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 20, 2018

It does not matter which python version is used. As clearly seen from your log it's incomplete meaning the problem is all yours.
Also your log looks like you only capture stderr but not stdout so you don't get any visual output after the first error.

@Cokemonkey11
Copy link
Author

@Cokemonkey11 Cokemonkey11 commented Aug 22, 2018

Thanks for looking again.

I am not sure what's changed, but it seems:

  • I can now successfully fetch all sources in the playlist at the above URL
  • I get much fewer values in the playlist than you do (51 vs your 110)
  • After the process finishes, I get return code 1.

So a few thoughts:

  • Might my behavior differ from yours for some locale reasons?
  • I think it's wrong to return 1. Do you agree that's also a problem?
  • If so, should I raise a new issue, or would you like to track that here?

Thanks

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 22, 2018

  1. Mix is a sort of dynamic playlist with endless feed of repeating entries, so it's easily possible to return different rendition due to some reasons.
  2. No, returning 1 is perfectly legal since command is semi-failed.
@Cokemonkey11
Copy link
Author

@Cokemonkey11 Cokemonkey11 commented Aug 22, 2018

Thanks - I agree returning 1 can be reasonable.

  • I didn't see that documented though - does it mean that the value could change at any time? Or maybe just docs are kept short for brevity?
  • Can I rely on this only ever returning 1, if not 0? Then I can account for that.
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 22, 2018

  1. It's not documented and it's a mess at the moment, e.g. 101 is returned on successful --max-download reached scenario violating the only zero return code on success rule.
  2. That depends. If you want to detect general failures you're better use not 0 (if you don't use --max-download).
@Cokemonkey11
Copy link
Author

@Cokemonkey11 Cokemonkey11 commented Aug 25, 2018

Thanks! In order to ignore when a video is unavailable in -i mode, I now have some code like this:

set -euxo pipefail

ret=0
youtube-dl "ytsearch:$1" -v -i -f m4a --restrict-filenames --no-mtime -o '%(epoch)s.%(id)s.%(title).40s.%(ext)s' || ret=$?
if [ $ret -ne 0 && $ret -ne 1 ]; then exit $rc; fi
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.