Skip to content

Instantly share code, notes, and snippets.

@muelli
Created January 22, 2018 08:22
Show Gist options
  • Save muelli/609ae0dca43977b82100d84c0c667878 to your computer and use it in GitHub Desktop.
Save muelli/609ae0dca43977b82100d84c0c667878 to your computer and use it in GitHub Desktop.
Parser for projects having a stand at FOSDEM
#!/usr/bin/env python3
import logging
import sys
from bs4 import BeautifulSoup
content = open(sys.argv[1])
bs = BeautifulSoup(content, 'html.parser')
projects = bs.select(".stands-table-project")
for project in projects:
link = project.find_all("a")[0].get("href")
name = project.text.strip()
print ("%s;%s" % (link, name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment