Open X-Looper opened 8 years ago
See #1456
The api is down at the moment, not matter what request you send its returning 400 no client id specified, im using OAuth and I am specifying a client id - confirmed http://twitchstatus.com/
Thanks for the input guys, appreciated!
This guide is a little better (also on Reddit, and I think linked from the thing Baerht posted)
https://www.reddit.com/r/Twitch/comments/52sye3/livestreamer_help_please_help/d7n0j36
Edit:
Also, how is Twitch doing 'not logged in' users? Are they forcing everyone to sign up now?
Also, how is Twitch doing 'not logged in' users? Are they forcing everyone to sign up now?
There are two kinds of tokens, client-specific and user-specific. You need only one of them. For example, livestreamer --http-header Client-ID=jzkbprff40iqj646a697cyrvl0zt2m6
works (It is the token used by their own web player).
this workarround helped me to make it work again https://www.reddit.com/r/Twitch/comments/52sye3/livestreamer_help_please_help/d7n0j36 thax@mjevans
@LoneFox78 Add http-header is working fine for me, and livestreamer's client-id is "ewvlchtxgqq88ru9gmfp1gmyt6h2b93". Find it at livestreamer_cli/main.py#L534.
@LoneFox78 This works great via a terminal but I can't get it working from livestreamerrc. Any ideas? Thank you
Are you sure? You should be able to use all command line options as a option in the config file.
I don't really know python, but I got this working based on what youtube-dl does:
diff -bur livestreamer-20160315-orig/src/livestreamer/plugins/twitch.py livestreamer-20160315/src/livestreamer/plugins/twitch.py
--- livestreamer-20160315-orig/src/livestreamer/plugins/twitch.py 2016-03-15 06:28:45.000000000 +0200
+++ livestreamer-20160315/src/livestreamer/plugins/twitch.py 2016-09-15 20:56:25.000000000 +0300
@@ -27,6 +27,8 @@
}
+TWITCH_CLIENT_ID="ewvlchtxgqq88ru9gmfp1gmyt6h2b93"
+
_url_re = re.compile(r"""
http(s)?://
(?:
@@ -171,7 +173,7 @@
url = "https://{0}.twitch.tv{1}.{2}".format(self.subdomain, path, format)
# The certificate used by Twitch cannot be verified on some OpenSSL versions.
- res = http.get(url, params=params, verify=False)
+ res = http.get(url, params=params, verify=False, headers={'Client-ID': TWITCH_CLIENT_ID})
if format == "json":
return http.json(res, schema=schema)
diff -bur livestreamer-20160315-orig/src/livestreamer_cli/main.py livestreamer-20160315/src/livestreamer_cli/main.py
--- livestreamer-20160315-orig/src/livestreamer_cli/main.py 2016-03-15 06:28:45.000000000 +0200
+++ livestreamer-20160315/src/livestreamer_cli/main.py 2016-09-15 20:47:15.000000000 +0300
@@ -15,6 +15,7 @@
NoPluginError)
from livestreamer.cache import Cache
from livestreamer.stream import StreamProcess
+from livestreamer.plugins.twitch import TWITCH_CLIENT_ID
from .argparser import parser
from .compat import stdout, is_win32
@@ -531,7 +532,7 @@
"""Opens a web browser to allow the user to grant Livestreamer
access to their Twitch account."""
- client_id = "ewvlchtxgqq88ru9gmfp1gmyt6h2b93"
+ client_id = TWITCH_CLIENT_ID
redirect_uri = "http://livestreamer.tanuki.se/en/develop/twitch_oauth.html"
url = ("https://api.twitch.tv/kraken/oauth2/authorize/"
"?response_type=token&client_id={0}&redirect_uri="
Those having issues with livestreamerrc, this is the exact line I added to make it work again:
http-header=Client-ID=ewvlchtxgqq88ru9gmfp1gmyt6h2b93
Personally, I prefer to not show up in the viewer list when using LiveStreamer, but that's just me.
@4jb Thanks, for some reason it's working fine on windows but not linux.. probably my fault anyway.
@LoneFox78 Maybe you don't know python but your patch is correct. :) Could you please fork the livestreamer repo and create a branch with your changes? (a Pull Request will be even better). I want to pull your patch to my repo while keeping your authorship (because there are other changes that I want to apply upon it).
For those of you who just want an example using the client ID:
livestreamer --http-header Client-ID=jzkbprff40iqj646a697cyrvl0zt2m6 twitch.tv/streamer best
@javiercantero Done. For some reason it does not allow me to select your repository for the pull request, so I made it for this (chrippa's) repo instead. At least this way it is in the same place as all other accumulated fixes...
@LoneFox78 Perfect. From there, chrippa can merge it into upstream and also the rest of us can get the patch. Thank you.
@javiercantero, @chrippa no longer maintains this repo in any way, he hasn't merged a PR in over 6 months.
@gravyboat Oh no, really? Where is the to-go version of livestreamer then? (did anybody fork and is maintaining it or this is still the best version?)
@RainOne It was just forked today over here: https://github.com/streamlink/streamlink you can see more regarding that discussion here: https://github.com/chrippa/livestreamer/issues/1427
@gravyboat The last time @chrippa merged patches also happened after a 5 months period without activity, so IMHO it's too soon to declare the project unmaintained. But it's true that it's not looking good.
@javiercantero As I said in another thread I contacted him in every way possible I could find, and even offered to pay him to merge in some of the more essential PRs to keep things going and he never responded. He is still active on GitHub.
It seems that this good project has been dead. I will study the code firstly.
What would be the correct ID anyway, ewvlchtxgqq88ru9gmfp1gmyt6h2b93 or jzkbprff40iqj646a697cyrvl0zt2m6?
This works for me, in livestreamerrc:
http-header=Client-ID=jzkbprff40iqj646a697cyrvl0zt2m6
This is the variant for command-line usage:
livestreamer --http-header Client-ID=jzkbprff40iqj646a697cyrvl0zt2m6
One of these is necessary if, like me, you got a localized display name and found that Livestreamer can't deal with non-ASCII display names.
@vadosnaprimer One is the livestreamer own ID, another is the Twitch client ID. Both should work.
Boy, am I glad there is a work-around without requiring a livestreamer update! The required pieces were already there.
"livestreamer --twitch-oauth-authenticate"
i have the same problem now !!
didn’t get the access to this link to get the data (TwitchTV project) https://api.twitch.tv/kraken/users/freecodecamp/follows/ : and this is the problem: GET https://api.twitch.tv/kraken/users/freecodecamp/follows/ 404 () can any one help me !! Thanks…
That isn't relevant to this issue, but I'll help out anyway; the API endpoints have changed: https://dev.twitch.tv/docs/api/reference#get-users
First you need a valid OAuth token or Client ID: https://dev.twitch.tv/docs/authentication
Next, use this URL, appending the token or client ID parameter, to find the User ID for freecodecamp: https://api.twitch.tv/helix/users?login=freecodecamp
Finally, this is how you get the follows: https://dev.twitch.tv/docs/api/reference#get-users-follows
Is anyone else experiencing problems watching Streams on Twitch with Livestreamer right now?
It was working just fine yesterday and now I'm getting the following error message while trying to watch any/all Streams: