mirror of
https://github.com/danieldemus/deconz_fw_downloader.git
synced 2025-01-10 07:02:03 +01:00
cadbbb8666
Pythony naming Signed-off-by: Daniel Demus <daniel-github@demus.dk>
25 lines
566 B
Python
25 lines
566 B
Python
#!/usr/bin/env python3
|
|
import json
|
|
from urllib.request import urlopen
|
|
|
|
from downloader import Downloader
|
|
|
|
class Ikea(Downloader):
|
|
|
|
def get_url_list(self):
|
|
|
|
f = urlopen("http://fw.ota.homesmart.ikea.net/feed/version_info.json")
|
|
data = f.read()
|
|
|
|
arr = json.loads(data)
|
|
res = []
|
|
for i in arr:
|
|
if 'fw_binary_url' in i:
|
|
url = i['fw_binary_url']
|
|
ls = url.split('/')
|
|
fname = ls[len(ls) - 1]
|
|
|
|
res.append((url, fname))
|
|
|
|
return res
|