mirror of
https://github.com/danieldemus/deconz_fw_downloader.git
synced 2025-01-10 15:12:00 +01:00
cadbbb8666
Pythony naming Signed-off-by: Daniel Demus <daniel-github@demus.dk>
23 lines
590 B
Python
23 lines
590 B
Python
#!/usr/bin/env python3
|
|
|
|
from posixpath import basename
|
|
import requests, json, time
|
|
from downloader import Downloader
|
|
|
|
class GithubKoenkk(Downloader):
|
|
|
|
def get_url_list(self):
|
|
res = []
|
|
response = requests.get('https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/index.json')
|
|
data = json.loads(response.content)
|
|
|
|
for x in data:
|
|
url = x['url']
|
|
if 'path' in x:
|
|
filename = basename(x['path'])
|
|
else:
|
|
filename = basename(url)
|
|
res.append((url, filename))
|
|
|
|
return res
|