@@ -18,7 +18,7 @@ def fetch_followed_channels(self, username):
18
18
try :
19
19
self .followed_channels = []
20
20
21
- self .f = urllib .urlopen ("https://api.twitch.tv/kraken/users/{0}/follows/channels?direction=DESC&limit=100&offset=0&sortby=created_at" .format (username ))
21
+ self .f = urllib .urlopen ("https://api.twitch.tv/kraken/users/{0}/follows/channels?client_id=oe77z9pq798tln7ngil0exwr0mun4hj& direction=DESC&limit=100&offset=0&sortby=created_at" .format (username ))
22
22
self .data = json .loads (self .f .read ())
23
23
24
24
# Return 404 if user does not exist
@@ -31,7 +31,7 @@ def fetch_followed_channels(self, username):
31
31
self .pages = (self .data ['_total' ] - 1 ) / 100
32
32
for page in range (0 , self .pages + 1 ):
33
33
if page != 0 :
34
- self .f = urllib .urlopen ("https://api.twitch.tv/kraken/users/{0}/follows/channels?direction=DESC&limit=100&offset={1}&sortby=created_at" .format (username , (page * 100 )))
34
+ self .f = urllib .urlopen ("https://api.twitch.tv/kraken/users/{0}/follows/channels?client_id=oe77z9pq798tln7ngil0exwr0mun4hj& direction=DESC&limit=100&offset={1}&sortby=created_at" .format (username , (page * 100 )))
35
35
self .data = json .loads (self .f .read ())
36
36
37
37
for channel in self .data ['follows' ]:
@@ -54,7 +54,7 @@ def fetch_live_streams(self, channels):
54
54
self .offset = self .channels_count
55
55
self .channels_offset = channels [(page * 75 ):self .offset ]
56
56
57
- self .f = urllib .urlopen ("https://api.twitch.tv/kraken/streams?channel={0}" .format (',' .join (self .channels_offset )))
57
+ self .f = urllib .urlopen ("https://api.twitch.tv/kraken/streams?client_id=oe77z9pq798tln7ngil0exwr0mun4hj& channel={0}" .format (',' .join (self .channels_offset )))
58
58
self .data = json .loads (self .f .read ())
59
59
60
60
for stream in self .data ['streams' ]:
0 commit comments