Skip to content

Instantly share code, notes, and snippets.

@krruzic
Last active January 12, 2020 00:44
Show Gist options
  • Save krruzic/598a8a5a952828e25673f555a00e8b75 to your computer and use it in GitHub Desktop.
Save krruzic/598a8a5a952828e25673f555a00e8b75 to your computer and use it in GitHub Desktop.
Smash Ultimate renders courtesy of WarChamp7
from bs4 import BeautifulSoup
import requests
homepage = requests.get("https://apps.warchamp7.com/smash/rosterUlt/")
hp_soup = BeautifulSoup(homepage.text, features="lxml")
characters = hp_soup.find(id="IconList").find_all("label")
names = ["_".join(character["for"].split("_")[1:]) for character in characters]
portraits = {}
for name in names[0:-1]: # remove random
print(f'Saving CSS renders for: {name}')
portraits[name] = [f'https://apps.warchamp7.com/smash/rosterUlt/ult/chara_1_{name}_0{i}.png' for i in range(0,8)]
for idx, portrait in enumerate(portraits[name]):
img = requests.get(portrait)
with open(f'assets/{name}_0{idx}.png', 'wb') as f:
f.write(img.content)
@krruzic
Copy link
Author

krruzic commented Jan 12, 2020

mkdir assets/ && python ssbu_css.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment