Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

downloadclip to steamlinks finding 404 url error #11

Answered by makingmath
makingmath asked this question in Q&A
Discussion options

Hello I am Not very great at python and ive been learning as i go with this project,

so far when ive been ready to ask a question ive been able to look at the problem and usually fumble my way to a solution or to understanding of the code.

So far i am on ubuntu 21.04, laptop, everything is updated.

I have installed pyenv to get the 3.8 version of python to be the default of my system

  • using vs code as my ide.
  • installed poetry and set up a virtual environment for the project.
  • checked and installed all of the imports i would need to have installed on the virtual environment.
  • after creating a content id and hidden id i ran into an error that was resolved by creating a new hidden id. So I'm almost sure that my id's are correct and ok. But i have a feeling they may be what is the issue I am having with getting the code to run.

So where im running into trouble is getting the download clips function to work. everything seems to run very well as in it grabs hundreds of clips from a category stores them properly, I checked and saw no url links that would not work.

When I run the code I get an error specifying that there was more than one exception. and it is relating to a url link that is bad and not reachable (404)

Ive checked in many areas of the code where a url is stored and used and most of the time it is working well with no issues.

here is the end snippit of the error/ traceback.
File "/home/aop/.cache/pypoetry/virtualenvs/neuralnetworks-2a4JKI7z-py3.8/lib/python3.8/site-packages/streamlink/stream/http.py", line 70, in open
res = self.session.http.request(method=method,
File "/home/aop/.cache/pypoetry/virtualenvs/neuralnetworks-2a4JKI7z-py3.8/lib/python3.8/site-packages/streamlink/plugin/api/http_session.py", line 145, in request
raise err
streamlink.exceptions.StreamError: Unable to open URL: https://production.assets.clips.twitchcdn.net/AT-cm%7C1214941796.mp4 (404 Client Error: for url: https://production.assets.clips.twitchcdn.net/AT-cm%7C1214941796.mp4)

when checking for any parts of the code that are causing the url to change I believe I found the section of code that is causing the url to be changed. and that is in the import of streamlink.plugin.api. http_session.py

i think in particualr its the function called "request" around 100ish in the .py file of the import. (sorry im probably calling it by the wrong name)

i threw a print statement in there and noticed that it changed the link a few times like the following

"
this is the working correct url it is given
https://clips.twitch.tv/EnthusiasticDaintyManateeStinkyCheese-QSkj9XT50dL0lqP9
this is some other url the streamlink import function seemed to have changed
https://gql.twitch.tv/gql
and this is the final output of the streamlink function that seems to return a 404 link can cannot be found and stops the code.
https://production.assets.clips.twitchcdn.net/AT-cm%7C1214941796.mp4
"
So I am not sure why this code is taking an otherwise working link, changing it in a way that it doesnt work. ( im sure it needs to change it to make it readable and ingest able in other functions but something is going wrong in this step)

i question the way i set up my twitch id and hidden id is that its the api that is sending back a 404 code so maybe its my fault and my id's are what are causing the issues when generating the alternate url

Has anyone seen this before, or has twitch recently updated its api do that these types of links that are generated no longer work?

I have looked up other production.assets.clips and they also lead to a 404 as well.
I wanted to ask if anyone else is having this issue? or if you think I set up my twitch content id's incorrectly to work with the API's in this code.

You must be logged in to vote

After looking more into this the errors were pointing to streamlinks what could have happened is i messed up the code by accidentally editing it or i may have downloaded a version that is incompatible with the code. i updated it in pip ran the code and it seems to be working!!!!!

Replies: 1 comment

Comment options

After looking more into this the errors were pointing to streamlinks what could have happened is i messed up the code by accidentally editing it or i may have downloaded a version that is incompatible with the code. i updated it in pip ran the code and it seems to be working!!!!!

You must be logged in to vote
0 replies
Answer selected by makingmath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /