Created
September 3, 2019 03:03
-
-
Save turnipsoup/9fe12f515f965e70d7b75670147ffd99 to your computer and use it in GitHub Desktop.
Download all iterm2colors from the website https://iterm2colorschemes.com/
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 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