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 Download KO : 404 error #29136

Closed
keustii opened this issue May 26, 2021 · 6 comments
Closed

Twitch Download KO : 404 error #29136

keustii opened this issue May 26, 2021 · 6 comments

Comments

@keustii
Copy link

keustii commented May 26, 2021

Checklist

  • [x ] I'm reporting a broken site support
  • [ x] I've verified that I'm running youtube-dl version 2021.05.16
  • [x ] I've checked that all provided URLs are alive and playable in a browser
  • [x ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • [x ] I've searched the bugtracker for similar issues including closed ones

Verbose log

D:\youtube>dl.exe  -v https://clips.twitch.tv/ShyAltruisticCheeseTooSpicy-T9tbKcc01auwU1a0
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://clips.twitch.tv/ShyAltruisticCheeseTooSpicy-T9tbKcc01auwU1a0']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2021.05.16
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg 4.3.2-2021-02-20-full_build-www.gyan.dev, ffprobe 4.4-essentials_build-www.gyan.dev
[debug] Proxy map: {}
[twitch:clips] ShyAltruisticCheeseTooSpicy-T9tbKcc01auwU1a0: Downloading clip GraphQL
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://production.assets.clips.twitchcdn.net/AT-cm%7C1190085627.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

its was working since yesterday, i just start my script and its fail,
im using the last .Exe files,

@ghost
Copy link

ghost commented May 26, 2021

note : looks like same or similar URLs, but you need to pick up an auth token/?sig= from graphql first or something.

it also looks like the URL structures have all changed. it's no longer something like:

https://clips.twitch.tv/CooperativeCrowdedEmuPJSugar

but all new clips have required ID at end

https://clips.twitch.tv/CooperativeCrowdedEmuPJSugar-HMI6W5ByHM5Aws7w

new DL looks like https://production.assets.clips.twitchcdn.net/AT-cm|xxxx.mp4?sig=xxxx&token={"authorization":{"forbidden":false,"reason":""},"clip_uri":"","device_id":"xxxxx","expires":xxxx,"user_id":"","version":2}

GQL op:

[{"operationName":"VideoAccessToken_Clip","variables":{"slug":"NameOfClip-RandomIdOfClip"},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"36b89d2507fce29e5ca551df756d27c1cfe079e2609642b4390aa4c35796eb11"}}}]

GQL response:

[{
    "data": {
        "clip": {
            "id": "<NUMBERS>",
            "playbackAccessToken": {
                "signature": "<SIGNATURE>",
                "value": "{\"authorization\":{\"forbidden\":false,\"reason\":\"\"},\"clip_uri\":\"\",\"device_id\":\"<HASH>\",\"expires\":<EPOCH TIME INT>,\"user_id\":\"\",\"version\":2}",
                "__typename": "PlaybackAccessToken"
            },
            "videoQualities": [{
                "frameRate": 60,
                "quality": "1080",
                "sourceURL": "https://production.assets.clips.twitchcdn.net/AT-cm|<NUMBERS>.mp4",
                "__typename": "ClipVideoQuality"
            }, {
                "frameRate": 60,
                "quality": "720",
                "sourceURL": "https://production.assets.clips.twitchcdn.net/AT-cm|<NUMBERS>-720.mp4",
                "__typename": "ClipVideoQuality"
            }, {
                "frameRate": 30,
                "quality": "480",
                "sourceURL": "https://production.assets.clips.twitchcdn.net/AT-cm|<NUMBERS>-480.mp4",
                "__typename": "ClipVideoQuality"
            }, {
                "frameRate": 30,
                "quality": "360",
                "sourceURL": "https://production.assets.clips.twitchcdn.net/AT-cm|<NUMBERS>-360.mp4",
                "__typename": "ClipVideoQuality"
            }],
            "__typename": "Clip"
        }
    },
    "extensions": {
        "durationMilliseconds": 60,
        "operationName": "VideoAccessToken_Clip",
        "requestID": "<RANDOM REQUEST ID>"
    }
}]

@2c2c
Copy link

2c2c commented May 26, 2021

Issue started occuring between 12:10 and 1:10pm LA time today

@keustii
Copy link
Author

keustii commented May 26, 2021

for bypass and get the url i use selenium for the moment :

`from selenium import webdriver

chromedriverpath = "yourChromedriverPath"
driver = webdriver.Chrome( executable_path=chromedriverpath)
url = "https://www.twitch.tv/sardoche/clip/ShyAltruisticCheeseTooSpicy-T9tbKcc01auwU1a0"
driver.get(url)
video = driver.find_element_by_tag_name('video')
url = driver.execute_script("return arguments[0].currentSrc;", video)
print(url)
driver.quit()`

@evancloutier
Copy link

FWIW, their alternative CDN has not had this change roll out yet: https://clips-media-assets2.twitch.tv/

@keustii
Copy link
Author

keustii commented May 26, 2021

FWIW, their alternative CDN has not had this change roll out yet: https://clips-media-assets2.twitch.tv/

u save my night. :) thx

@ibex-are-goats
Copy link

ibex-are-goats commented May 29, 2021

Can reproduce!

-F:

ID EXT RESOLUTION FPS | PROTO | VCODEC ACODEC
360 mp4 360p 30 | https | unknown unknown
480 mp4 480p 30 | https | unknown unknown
720 mp4 720p 60 | https | unknown unknown
1080 mp4 1080p 60 | https | unknown unknown

Download any:

ERROR: unable to download video data: HTTP Error 404:

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

No branches or pull requests

4 participants