You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GetTwitchData.py has an issue with some user names and will run into an error.
Getting viewers for 악어...
Traceback (most recent call last):
File "C:/Scripts/VisualizingTwitchCommunities/DataCollection/main.py", line 17, in <module>
main()
File "C:/Scripts/VisualizingTwitchCommunities/DataCollection/main.py", line 11, in main
dict = GetTwitchData.GetDictOfStreamersAndViewers(json) #Create a dictionary of {streamer:[viewers]} from those 100 streams
File "C:\Scripts\VisualizingTwitchCommunities\DataCollection\GetTwitchData.py", line 44, in GetDictOfStreamersAndViewers
viewers = getCurrentViewersForChannel(streamer.lower()) #Get viewers for a particular streamer
File "C:\Scripts\VisualizingTwitchCommunities\DataCollection\GetTwitchData.py", line 29, in getCurrentViewersForChannel
r = requests.get('http://tmi.twitch.tv/group/user/'+ channel.lower() +'/chatters').json()
File "C:\Users\%User%\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\models.py", line 898, in json
return complexjson.loads(self.text, **kwargs)
I was able to fix it by just changing line 41 in GetTwitchData.py from user_name to user_login. user_login uses the streamers url name in cases where the streamers stream name and url are different
streamers= [element['user_login'] forelementinj['data']] #Get just the list of streamers
The text was updated successfully, but these errors were encountered:
apoordev
changed the title
GetTwitchData.py Streamer name doesn't match url
GetTwitchData.py Streamer name doesn't match Twitch url
Apr 4, 2021
GetTwitchData.py has an issue with some user names and will run into an error.
I was able to fix it by just changing line 41 in GetTwitchData.py from user_name to user_login. user_login uses the streamers url name in cases where the streamers stream name and url are different
The text was updated successfully, but these errors were encountered: