deconz_fw_downloader/danfoss.py
Daniel Demus cadbbb8666 Add download from github.com/koenkk
Pythony naming
Signed-off-by: Daniel Demus <daniel-github@demus.dk>
2022-10-04 00:01:06 +02:00

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