Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use client ID for twitch.tv API calls#1483

Open
LoneFox78 wants to merge 1 commit into
chrippa:developfrom
LoneFox78:develop
Open

Use client ID for twitch.tv API calls#1483
LoneFox78 wants to merge 1 commit into
chrippa:developfrom
LoneFox78:develop

Conversation

@LoneFox78

Copy link
Copy Markdown

No description provided.

@javiercantero javiercantero left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@flijloku

Copy link
Copy Markdown

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

@gravyboat

Copy link
Copy Markdown

@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
Copy Markdown
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

flijloku commented Sep 17, 2016

Copy link
Copy Markdown

@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
Copy Markdown

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
Copy Markdown
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

javiercantero commented Sep 17, 2016

Copy link
Copy Markdown
Contributor

@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

flijloku commented Sep 17, 2016

Copy link
Copy Markdown

@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

alphapapa commented Sep 17, 2016

Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown

@javiercantero Okay. Anyway, thank you.

@Summon528

Copy link
Copy Markdown
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

flijloku commented Sep 18, 2016

Copy link
Copy Markdown

@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