Skip to content

Instantly share code, notes, and snippets.

@jgengo
Created November 28, 2021 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgengo/e31fbdadb2982308198e5ab08f0f668c to your computer and use it in GitHub Desktop.
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
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