Created
November 28, 2021 14:20
-
-
Save jgengo/e31fbdadb2982308198e5ab08f0f668c to your computer and use it in GitHub Desktop.
Gist for https://youtu.be/HTF6rhp_LXE, using Postman and Python to find latest iTerm2 version
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
import requests | |
from xml.etree import ElementTree as ET | |
url = "https://iterm2.com/appcasts/final_modern.xml" | |
res = requests.get(url).text | |
xml_data = ET.fromstring(res) | |
attribs = xml_data.find("channel/item/enclosure").attrib | |
for x in list(attribs): | |
attribs[x.replace("{http://www.andymatuschak.org/xml-namespaces/sparkle}", "")] = attribs.pop(x) | |
print(f"iTerm2 {attribs['version']} is currently the newest version available.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment