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

Twitch VOD failed to download m3u8 info http error 404 #21538

Closed
5 of 6 tasks
AccountOneOff opened this issue Jun 27, 2019 · 5 comments
Closed
5 of 6 tasks

Twitch VOD failed to download m3u8 info http error 404 #21538

AccountOneOff opened this issue Jun 27, 2019 · 5 comments

Comments

@AccountOneOff
Copy link

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2019.06.21
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

youtube-dl --ignore-config -g https://www.twitch.tv/videos/444279462 --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--ignore-config', '-g', 'https://www.twitch.tv/videos/444279462', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.06.21
[debug] Python version 3.7.3 (CPython) - Linux-5.0.0-19-generic-x86_64-with-Ubuntu-19.04-disco
[debug] exe versions: ffmpeg 4.1.3, ffprobe 4.1.3, rtmpdump 2.4
[debug] Proxy map: {}
ERROR: Failed to download m3u8 information: HTTP Error 404: Not Found (caused by <HTTPError 404: 'Not Found'>); 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.
  File "/usr/local/lib/python3.7/dist-packages/youtube_dl/extractor/common.py", line 627, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/lib/python3.7/dist-packages/youtube_dl/YoutubeDL.py", line 2227, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.7/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)

Description

I'm not able to download any Twitch VODs. This is a recent bug as I'm not able to download a VOD I downloaded just yesterday.

@dstftw
Copy link
Collaborator

dstftw commented Jun 27, 2019

> py -3.7 .\youtube_dl\__main__.py https://www.twitch.tv/videos/444279462
[twitch:vod] 444279462: Downloading vod info JSON
[twitch:vod] 444279462: Downloading vod access token
[twitch:vod] 444279462: Downloading m3u8 information
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 4876
[download] Destination: Mario Maker 1 Finale-v444279462.mp4
[download]   0.0% of ~36.16GiB at 382.83KiB/s ETA 12:46:01
ERROR: Interrupted by user

@AccountOneOff
Copy link
Author

Rebooting solved this.

@caldwell
Copy link
Contributor

I'm getting the same error when trying to download twitch VODs:

$ youtube-dl --verbose --ignore-config https://www.twitch.tv/videos/445753015
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'--ignore-config', u'https://www.twitch.tv/videos/445753015']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.06.27
[debug] Python version 2.7.15 (CPython) - Darwin-18.6.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.0.2, ffprobe 4.0.2
[debug] Proxy map: {}
[twitch:vod] 445753015: Downloading vod info JSON
[twitch:vod] 445753015: Downloading vod access token
[twitch:vod] 445753015: Downloading m3u8 information
ERROR: Failed to download m3u8 information: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 627, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2227, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

This happens on 2 different machines, one Debian (testing) and one Mac OS X 10.14.5 (installed from homebrew, version given is 2019.06.27).

Since it doesn't seem to be universally broken, what could be causing my 2 machines to fail? They are both on my home network—could it be something like DNS?

How do I find the actual URL that is giving the 404?

@omion
Copy link

omion commented Jul 2, 2019

I'm getting the same error with version 2019.07.02, on Windows 10 and macOS Mojave. I have so far tried two different wifi networks, with the same results. All VODs I have tested work fine on my computers' browsers. My Windows log is:

youtube-dl --verbose -F "https://www.twitch.tv/videos/445242771"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '-F', 'https://www.twitch.tv/videos/445242771']
[debug] Encodings: locale cp1252, fs mbcs, out cp65001, pref cp1252
[debug] youtube-dl version 2019.07.02
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg N-91297-g70742f0264, ffprobe N-91297-g70742f0264
[debug] Proxy map: {}
[twitch:vod] 445242771: Downloading vod info JSON
[twitch:vod] 445242771: Downloading vod access token
[twitch:vod] 445242771: Downloading m3u8 information
ERROR: Failed to download m3u8 information: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfkuku\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfkuku\build\youtube_dl\YoutubeDL.py", line 2227, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default

I started having this issue about a week ago, but it went away. It came back sometime between June 28 and now (July 1). The URL in the log is one that I had already downloaded before, but it stopped working along with every other VOD I try.

(Should I make a new issue for this? It's the exact same problem as the original post... I don't know GitHub etiquette)

@caldwell
Copy link
Contributor

caldwell commented Jul 2, 2019

I think I've found the issue. I'll create a pull request and reference this bug. If you have access to the source you can try this change:

diff --git a/youtube_dl/extractor/twitch.py b/youtube_dl/extractor/twitch.py
index dc5ff29c3..7147f9169 100644
--- a/youtube_dl/extractor/twitch.py
+++ b/youtube_dl/extractor/twitch.py
@@ -317,8 +319,8 @@ class TwitchVodIE(TwitchItemBaseIE):
             'Downloading %s access token' % self._ITEM_TYPE)

         formats = self._extract_m3u8_formats(
-            '%s/vod/%s?%s' % (
+            '%s/vod/%s.m3u8?%s' % (
                 self._USHER_BASE, item_id,
                 compat_urllib_parse_urlencode({
                     'allow_source': 'true',
                     'allow_audio_only': 'true',

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

4 participants