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

ERROR: unable to download video data: HTTP Error 404: (when downloading Twitch clips) #29183

Closed
5 tasks done
scfip opened this issue Jun 1, 2021 · 4 comments
Closed
5 tasks done

Comments

@scfip
Copy link

scfip commented Jun 1, 2021

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2021.05.16
  • 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 issues including closed ones

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.twitch.tv/loltyler1/clip/BlightedDrabLasagnaOptimizePrime']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2021.05.16
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: none
[debug] Proxy map: {}
[twitch:clips] BlightedDrabLasagnaOptimizePrime: Downloading clip GraphQL
[debug] Default format spec: best/bestvideo+bestaudio
[debug] Invoking downloader on 'https://production.assets.clips.twitchcdn.net/AT-cm%7C956442975.mp4'
ERROR: unable to download video data: HTTP Error 404:
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp8rlhijs0\build\youtube_dl\YoutubeDL.py", line 1976, in process_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp8rlhijs0\build\youtube_dl\YoutubeDL.py", line 1915, in dl
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp8rlhijs0\build\youtube_dl\downloader\common.py", line 366, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp8rlhijs0\build\youtube_dl\downloader\http.py", line 351, in real_download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp8rlhijs0\build\youtube_dl\downloader\http.py", line 116, in establish_connection
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp8rlhijs0\build\youtube_dl\downloader\http.py", line 110, in establish_connection
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp8rlhijs0\build\youtube_dl\YoutubeDL.py", line 2288, 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
urllib.error.HTTPError: HTTP Error 404:

Description

I have been using youtube-dl in my python project daily for the past few months to download clips from the Twitch website, and it has been working perfectly ever since I started with it. I did not change anything in my code at all, nor any other systems, but a few days ago, youtube-dl just randomly became unable to download clips from Twitch, it just keeps giving me this error message. I assumed it was just an update issue, so I updated youtube-dl, but it still does not work. I tried downloading a video by giving it a Youtube link instead of a Twitch link and it works, so it seems like the problem is only related to Twitch (and maybe other sites I did not test). I tried the same code on two different systems and they both did not work, so I do not think it is a system issue either. I attached the basic code that I am trying to get working below. This code is standard, and worked in the past, but I don't know if there is something that I should change in my options, or it that even is the issue. I also attached the output of the code into the console to see the error message easier. Any help would be greatly appreciated. Thank you.

3d223c08d9cf3225711a58c62bcfacc4
0957c53dbbfeb2b007899cc3b122af7f

import youtube_dl
url = "https://www.twitch.tv/loltyler1/clip/BlightedDrabLasagnaOptimizePrime"
try:
ydl_opts = { # options for downloading clip
'format': 'best', # best quality
'outtmpl': "twitch_clip.mp4", # downloaded clip file name
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download([url])

except Exception:
print("Error downloading twitch clip")
print()

@dstftw dstftw closed this as completed Jun 1, 2021
@Flexlolo
Copy link

Flexlolo commented Jun 1, 2021

Link to original issue? Tried to search with 'is:issue is:open twitch' and did not find anything related to this.

@liamengland1
Copy link

It was fixed. @Flexlolo #29136

@scfip
Copy link
Author

scfip commented Jun 3, 2021

From what I saw on the discussion posts, it seems like the fix was created, but has it been "updated" yet because I still get the same error message when I try to download the clip. I also tried updating youtube-dl in python, but it says it is already up to date.

@rautamiekka
Copy link
Contributor

rautamiekka commented Jun 3, 2021

ytdl doesn't auto-release even the "secret" compilations by GitHub Actions cuz the project's 100% Open Source Python project, so if you wanna use the fix before an official release you can go to the respective commit and click the 'Browse Files' button in the top right to bring yourself to the file tree, then you need to download the 'youtube_dl' folder and execute the ZIP (assuming the '__main__.py' is in the root) or the 'youtube_dl' folder or the '__main__.py' with Python.

Or, download the one from the 'master' branch instead of the specific commit.

Obviously the version reported that way is a lie until an official release.

All of these are valid:

REM The folder:
# python I:\_DOWNLOADS_\youtube_dl --version
2021.05.16

REM The main file:
# python I:\_DOWNLOADS_\youtube_dl\__main__.py --version
2021.05.16

REM The folder with the main file in the root as a ZIP:
# python I:\_DOWNLOADS_\youtube_dl.zip --version
2021.05.16

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

5 participants