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

unable to download video info webpage: HTTP Error 404: Not Found #29037

Closed
ghost opened this issue May 13, 2021 · 4 comments
Closed

unable to download video info webpage: HTTP Error 404: Not Found #29037

ghost opened this issue May 13, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented May 13, 2021

youtube-dl -x --audio-format mp3 https://www.youtube.com/playlist?list=PLN9FZ3ijwb1GESe-ESS6uydZuoQ0FtKU_

...
[youtube] AsIQ_kA77b4: Downloading webpage
[download] Destination: Ghost in the Shell (1995) Opening-AsIQ_kA77b4.m4a
[download] 100% of 2.93MiB in 00:00
[ffmpeg] Correcting container in "Ghost in the Shell (1995) Opening-AsIQ_kA77b4.m4a"
[ffmpeg] Destination: Ghost in the Shell (1995) Opening-AsIQ_kA77b4.mp3
Deleting original file Ghost in the Shell (1995) Opening-AsIQ_kA77b4.m4a (pass -k to keep)
[download] Downloading video 57 of 242
[youtube] DNPM95iuKKk: Downloading webpage
[youtube] DNPM95iuKKk: Refetching age-gated info webpage
WARNING: unable to download video info webpage: HTTP Error 404: Not Found
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/main.py", line 19, in
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 475, in main
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 465, in _real_main
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2060, in download
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 799, in extract_info
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 806, in wrapper
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 838, in __extract_info
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 924, in process_ie_result
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1058, in __process_playlist
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 806, in wrapper
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1068, in __process_iterable_entry
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 879, in process_ie_result
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 799, in extract_info
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 806, in wrapper
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 827, in __extract_info
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 534, in extract
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1502, in _real_extract
File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 2644, in compat_parse_qs
File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 2614, in _parse_qsl
AttributeError: 'bool' object has no attribute 'split'
root@sparrow:/home/rene/Downloads/youtube/DBZ AMV GMV#

please let me know if, and how, i possibly should provide you with more details.

@dirkf
Copy link
Contributor

dirkf commented May 14, 2021

-v ?

A hint as to which of the 242 items is being processed?

The crash is in code that is run only for Python 2.

I get

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-F', u'--ignore-config', u'https://www.youtube.com/playlist?list=PLN9FZ3ijwb1GESe-ESS6uydZuoQ0FtKU_']
[debug] Encodings: locale ASCII, fs ASCII, out ASCII, pref ASCII
[debug] youtube-dl version 2021.04.26
[debug] Python version 2.7.1 (CPython) - Linux-2.6.18-7.1-7405b0-smp-with-libc0
[debug] exe versions: ffmpeg 4.1, ffprobe 4.1
[debug] Proxy map: {}
[youtube:tab] PLN9FZ3ijwb1GESe-ESS6uydZuoQ0FtKU_: Downloading webpage
[download] Downloading playlist: DBZ AMV GMV XXG
[youtube:tab] Downloading page 1
[youtube:tab] Downloading page 2
[youtube:tab] playlist DBZ AMV GMV XXG: Downloading 242 videos
[download] Downloading video 1 of 242
[youtube] qlaki1uw0Hc: Downloading webpage
[youtube] qlaki1uw0Hc: Downloading player 24fb4fc5
[info] Available formats for qlaki1uw0Hc:
format code  extension  resolution note
249          webm       audio only tiny   55k , webm_dash container, opus @ 55k (48000Hz), 1.11MiB
250          webm       audio only tiny   72k , webm_dash container, opus @ 72k (48000Hz), 1.45MiB
140          m4a        audio only tiny  129k , m4a_dash container, mp4a.40.2@129k (44100Hz), 2.59MiB
251          webm       audio only tiny  143k , webm_dash container, opus @143k (48000Hz), 2.87MiB
160          mp4        256x144    144p   61k , mp4_dash container, avc1.4d400c@  61k, 25fps, video only, 1.24MiB
394          mp4        256x144    144p   64k , mp4_dash container, av01.0.00M.08@  64k, 25fps, video only, 1.30MiB
278          webm       256x144    144p   85k , webm_dash container, vp9@  85k, 25fps, video only, 1.71MiB
133          mp4        426x240    240p  115k , mp4_dash container, avc1.4d4015@ 115k, 25fps, video only, 2.32MiB
395          mp4        426x240    240p  127k , mp4_dash container, av01.0.00M.08@ 127k, 25fps, video only, 2.55MiB
242          webm       426x240    240p  139k , webm_dash container, vp9@ 139k, 25fps, video only, 2.79MiB
134          mp4        640x360    360p  215k , mp4_dash container, avc1.4d401e@ 215k, 25fps, video only, 4.31MiB
243          webm       640x360    360p  251k , webm_dash container, vp9@ 251k, 25fps, video only, 5.04MiB
396          mp4        640x360    360p  257k , mp4_dash container, av01.0.01M.08@ 257k, 25fps, video only, 5.16MiB
135          mp4        854x480    480p  303k , mp4_dash container, avc1.4d401e@ 303k, 25fps, video only, 6.07MiB
244          webm       854x480    480p  380k , webm_dash container, vp9@ 380k, 25fps, video only, 7.61MiB
397          mp4        854x480    480p  466k , mp4_dash container, av01.0.04M.08@ 466k, 25fps, video only, 9.35MiB
136          mp4        1280x720   720p  509k , mp4_dash container, avc1.4d401f@ 509k, 25fps, video only, 10.21MiB
247          webm       1280x720   720p  642k , webm_dash container, vp9@ 642k, 25fps, video only, 12.87MiB
398          mp4        1280x720   720p  873k , mp4_dash container, av01.0.05M.08@ 873k, 25fps, video only, 17.49MiB
399          mp4        1920x1080  1080p 1508k , mp4_dash container, av01.0.08M.08@1508k, 25fps, video only, 30.20MiB
248          webm       1920x1080  1080p 1708k , webm_dash container, vp9@1708k, 25fps, video only, 34.21MiB
137          mp4        1920x1080  1080p 1800k , mp4_dash container, avc1.640028@1800k, 25fps, video only, 36.05MiB
18           mp4        640x360    360p  495k , avc1.42001E, 25fps, mp4a.40.2 (44100Hz), 9.93MiB (best)
[download] Downloading video 2 of 242
[youtube] TN4yPTl-a3E: Downloading webpage
[info] Available formats for TN4yPTl-a3E:
...

@stilor
Copy link

stilor commented Jun 22, 2021

Still a bug with 2021.06.06:

avn@aigle:~/Videos/YT$ youtube-dl --list-subs -v https://www.youtube.com/watch?v=5GLtk2cLRu4
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--list-subs', u'-v', u'https://www.youtube.com/watch?v=5GLtk2cLRu4']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.06.06
[debug] Python version 2.7.18 (CPython) - Linux-5.8.0-55-generic-x86_64-with-Ubuntu-20.10-groovy
[debug] exe versions: ffmpeg 4.3.1, ffprobe 4.3.1
[debug] Proxy map: {}
[youtube] 5GLtk2cLRu4: Downloading webpage
[youtube] 5GLtk2cLRu4: Refetching age-gated info webpage
WARNING: unable to download video info webpage: HTTP Error 404: Not Found
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 475, in main
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 465, in _real_main
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2069, in download
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 808, in extract_info
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 815, in wrapper
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 836, in __extract_info
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 534, in extract
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1503, in _real_extract
  File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 2644, in compat_parse_qs
  File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 2614, in _parse_qsl
AttributeError: 'bool' object has no attribute 'split'

As one may see, _download_webpage in common.py can indeed return a bool instead of a string (if res is False branch):

        if res is False:
            return res
        else:
            content, _ = res
            return content

Note that the "rebuttal" comment by @dirkf did not actually attempt to download an age-restricted page; no "Refetching age-gated info webpage" message in the log.

@stilor
Copy link

stilor commented Jun 22, 2021

For those in need of a workaround: get a 'cookies.txt' extension, save the cookies file from the webpage after you log in, then pass that file via --cookies=... option.

@dirkf
Copy link
Contributor

dirkf commented Jun 23, 2021

See issue #29333.

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

No branches or pull requests

3 participants