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

Use client ID for twitch.tv API calls #1483

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Use client ID for twitch.tv API calls #1483

wants to merge 1 commit into from

Conversation

LoneFox78
Copy link

No description provided.

Copy link
Contributor

@javiercantero javiercantero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and working. If fixes #1456 / #1478

@javiercantero
Copy link
Contributor

Maybe you should add to the commit message that it fixes #1456 / #1478

@flijloku
Copy link

Strange. For me it works if I change only twitch.pyc. If I replace main.pyc displays an error.
222

@gravyboat
Copy link

@LoneFox78 this should be moved over here: https://github.com/streamlink/streamlink it's the fork that was started today to actually maintain livestreamer. We should probably try to get some tests in as well.

@javiercantero
Copy link
Contributor

@flijloku It's better to remove all the *.pyc files and let the python interpreter rebuild them based on the most recent version of each *.py file.

@flijloku
Copy link

flijloku commented Sep 17, 2016

@javiercantero Sorry, but I'm not a programmer and do not know how to do it. I tried to change the * .pyc in the * .py (downloaded from https://github.com/streamlink/streamlink) in the directory C: \ Program Files (x86) \ Livestreamer \ livestreamer-1.12.2-py2.7.egg \ livestreamer\ and C: \ Program Files (x86) \ Livestreamer \ livestreamer-1.12.2-py2.7.egg \ livestreamer_cli \ and replace twitch.py and main.py, but getting the same result.

@alphapapa
Copy link

Thanks for making this patch.

One question, where does that client-id come from? In a script of mine, I just used the one from the Twitch AJAX code, and it works fine.

This whole client-ID thing is silly, anyway. They're just serving text/json over HTTP. The client-ID header proves absolutely nothing and is completely pointless. All they're doing is making busywork for everyone, including themselves.

@javiercantero
Copy link
Contributor

@flijloku

  1. Download the latest version from https://github.com/chrippa/livestreamer (the one that is a develop.zip) and uncompress it.
  2. Download the 2 files changed here (technically only src/livestreamer/plugins/twitch.py is actually required). Replace the uncompressed versions of the files by these.
  3. Run the new livestreamer version

@javiercantero
Copy link
Contributor

javiercantero commented Sep 17, 2016

@alphapapa It comes from Twitch. You register your application and they give you a ID for it. See https://blog.twitch.tv/client-id-required-for-kraken-api-calls-afbb8e95f843 for the details

@flijloku
Copy link

flijloku commented Sep 17, 2016

@javiercantero Hmm ... how can I run this on windows? There is no executable files.
P.S. It seems understood - "python setup.py install". But it installed in Python directory. Can I choose the path for the installation?

@alphapapa
Copy link

alphapapa commented Sep 17, 2016

@javiercantero Thanks. Well, you can go to all that trouble if you want, but I think I'll just use their own ID. :)

Sheesh, imagine if every browser had to register its own UUID with every web site it wanted to access... What are these people thinking...

@javiercantero
Copy link
Contributor

@flijloku Ah, OK, now I get it. The Windows version is already packed with its own interpreter and environment, ready to be installed in the proper place. The procedure that I was trying to explain is quite different and it assumes that you have installed your own python interpreter, the environment and such. It's possible but definitely more difficult. I think you should wait a bit until someone builds the corresponding installation files for Windows (I can't since I dont' use it).

@flijloku
Copy link

@javiercantero Okay. Anyway, thank you.

@Summon528
Copy link
Contributor

@flijloku Reinstall livestreamer (in case you screwed sth). Replace "C:\Program Files (x86)\Livestreamer\livestreamer-1.12.2-py2.7.egg\livestreamer\plugins\twitch.pyc" with
twitch.zip

@flijloku
Copy link

flijloku commented Sep 18, 2016

@Summon528 You did not understand. Above I wrote that with only replaced twitch.pyc everything works fine.

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

Successfully merging this pull request may close these issues.

6 participants