Closed kapiorr closed 1 year ago
I am also getting this error, whether I add twitch usernames via config file ("404 Client Error") or via !addstreamers ("Invalid twitch streamer") I tried entering just the username, the whole url with twitch(dot)tv(slash), and even the supposed twitch id
twitch deprecated the API I was using to get information about other twitch users, and I haven't got around updating it to use the new API yet. sorry.
Well that explains that. And no worries you do you! Maybe I can read around and see what is the way to do that now. Thank you
Finally got around to fixing this (supporting new twitch API), new version out later today
Haven't pushed a new version to pypi yet, but the master branch should be working again
Windows Python 3.10 Debian 11 Python 3.9
When run command @bot !addstreamers streamer always - get error: Invalid twitch streamer: If add streamer to config file, get error:
Traceback (most recent call last): File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/olo/.local/lib/python3.9/site-packages/twitch_monitor_discord_bot/__main__.py", line 112, in <module> main() File "/home/olo/.local/lib/python3.9/site-packages/twitch_monitor_discord_bot/__main__.py", line 93, in main monitor = TwitchMonitor(config.twitch_clientid, config.streamers) File "/home/olo/.local/lib/python3.9/site-packages/twitch_monitor_discord_bot/twitch_monitor.py", line 36, in __init__ self._update_users() File "/home/olo/.local/lib/python3.9/site-packages/twitch_monitor_discord_bot/twitch_monitor.py", line 39, in _update_users self.users = self.translate_usernames(self.usernames) File "/home/olo/.local/lib/python3.9/site-packages/twitch_monitor_discord_bot/twitch_monitor.py", line 88, in translate_usernames users.extend(self.client.users.translate_usernames_to_ids(req)) File "/home/olo/.local/lib/python3.9/site-packages/twitch/api/users.py", line 129, in translate_usernames_to_ids response = self._request_get("users?login={}".format(usernames)) File "/home/olo/.local/lib/python3.9/site-packages/twitch/api/base.py", line 53, in _request_get response.raise_for_status() File "/home/olo/.local/lib/python3.9/site-packages/requests/models.py", line 953, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.twitch.tv/kraken/users?login=streamer_name_example