Simplify scripts/findTreatedChannelWithMostSubscribers.py
This commit is contained in:
parent
654769b80b
commit
b60bb22112
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import os, requests, json
|
||||
import os, requests
|
||||
|
||||
channelIds = [channelId.replace('.zip', '') for channelId in next(os.walk('channels/'))[2]]
|
||||
maxResults = 50
|
||||
@ -11,8 +11,7 @@ mostSubscriberChannel = None
|
||||
|
||||
for channelIds in channelIdsChunks:
|
||||
url = 'https://yt.lemnoslife.com/noKey/channels?part=statistics&id=' + ','.join(channelIds)
|
||||
content = requests.get(url).text
|
||||
data = json.loads(content)
|
||||
data = requests.get(url).json()
|
||||
items = data['items']
|
||||
for item in items:
|
||||
subscriberCount = int(item['statistics']['subscriberCount'])
|
||||
|
Loading…
Reference in New Issue
Block a user