Skip to content

Instantly share code, notes, and snippets.

@turnipsoup
Created September 3, 2019 03:03
Show Gist options
  • Save turnipsoup/9fe12f515f965e70d7b75670147ffd99 to your computer and use it in GitHub Desktop.
Save turnipsoup/9fe12f515f965e70d7b75670147ffd99 to your computer and use it in GitHub Desktop.
Download all iterm2colors from the website https://iterm2colorschemes.com/
import bs4 as bs
import requests
r = requests.get("https://iterm2colorschemes.com/")
soup = bs.BeautifulSoup(r.content, "lxml")
for theme in soup.find_all("a", href=True):
if "raw.githubusercontent" in theme['href']:
file_name = theme.text.replace(" ","") + ".itermcolors"
with open(file_name, "w") as f:
themeget = requests.get(theme['href'])
f.write(themeget.text)
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment