February 23, 2015
I’m lucky enough to have a few friends who made it onto The Maserati 100, which is very cool. Unfortunately the website is a wall of faces, which is pretty but shitty to explore. 10 minutes of Python later, here’s the list of all those people (with links), and below, the Python code that generated it.
comments powered by Disqus
from bs4 import BeautifulSoup import requests r = requests.get("http://www.themaserati100.co.uk/") data = r.text soup = BeautifulSoup(data) for portfolio in soup.find_all('div', class_="portfolio-item"): print ("<li><a href=\"%s\">%s</a></li>" % (portfolio.a.get("href"), portfolio.img.get("alt")))