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

No stream_log when channel list is specified. #10

Open
apleith opened this issue May 23, 2017 · 3 comments
Open

No stream_log when channel list is specified. #10

apleith opened this issue May 23, 2017 · 3 comments

Comments

@apleith
Copy link

apleith commented May 23, 2017

I assume this is a byproduct of the code - stream data pulled with top streamer list - but I just wanted to make sure I'm not doing something incorrectly.

I am attempting to use a version of your code to pull chat logs for a larger subsection of Twitch.

For now, I'm just running a large list of specified channels to log their correlated chats but my research requires me to identify chat differences based on stream differences (e.g., game selection and viewer count). In the near future, I am hoping to adapt your bots to pull the top 1000+ English speaking channels. Based on my minimal knowledge, this would require running multiple list pulls using offset (though I'm unsure how the pagination is currently defined, I'm guessing I'll just trial-and-error).

Any suggestions or fixes for the stream_log problem would be greatly appreciated, as well as advice on language selection, offsetting, or bypassing the cap of 100 channels.

@bernardopires
Copy link
Owner

There's no cap of 100 channels. You can just pass -n 1000 or whatever number you want. Did that not work?

@apleith
Copy link
Author

apleith commented Nov 19, 2018

This is nearly 1.5 years later, but I had to switch projects to one that did not require such a large set of channels. But, I'm toying with this again now and am still having issues when I tool it up to 1000. Here is the output that occurs when I try to run it through the terminal.

apleith@APi:~/tcl$ python main.py -n 1000
Traceback (most recent call last):
File "main.py", line 24, in
main()
File "main.py", line 18, in main
manager.run_log_loop()
File "/home/apleith/tcl/manager.py", line 112, in run_log_loop
self._run_popular_streams_loop()
File "/home/apleith/tcl/manager.py", line 78, in _run_popular_streams_loop
streams = get_top_streams(self.channels_amount)
File "/home/apleith/tcl/utils.py", line 13, in get_top_streams
return json.loads(requests.get(twitch_api_url, headers=headers).text)['streams']
KeyError: 'streams'

If you readily know why this could be happening, that is great. Do not stress about it too much. If you can't, I know this isn't a priority of yours.

EDIT: It actually isn't working with anything over 100 (just tried it with 101).

@seonghobae
Copy link

Yes, this is not resolved. If I specified channel names, that is not working.

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

3 participants