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>
19 lines
547 B
Python
19 lines
547 B
Python
#!/usr/bin/env python3
|
|
|
|
from urllib.request import urlopen
|
|
from lxml.html import parse
|
|
|
|
from downloader import Downloader
|
|
|
|
class Danfoss(Downloader):
|
|
|
|
def get_url_list(self):
|
|
res = []
|
|
page = parse(urlopen('https://files.danfoss.com/download/Heating/Ally/')).getroot()
|
|
page.make_links_absolute('https://files.danfoss.com/download/Heating/Ally/')
|
|
for link in page.cssselect('a'):
|
|
if "OTA" in link.text_content():
|
|
res.append((link.get('href'), link.text_content()))
|
|
|
|
return res
|