Created
May 8, 2023 00:14
-
-
Save al3xtjames/878d6359b01c2982d1d5a0da2224efcf to your computer and use it in GitHub Desktop.
Dump URLs of UEFI capsule updates on LVFS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
from urllib.parse import urlparse | |
from urllib.request import urlopen, urlretrieve | |
from xml.etree import ElementTree | |
import gzip | |
with urlopen("https://cdn.fwupd.org/downloads/firmware.xml.gz") as response: | |
xml = gzip.decompress(response.read()).decode() | |
root = ElementTree.fromstring(xml) | |
components = root.findall("./component/custom/[value='org.uefi.capsule']/../releases/release/location") | |
urls = [component.text for component in components] | |
for url in urls: | |
print(url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment