Created
January 22, 2018 08:22
-
-
Save muelli/609ae0dca43977b82100d84c0c667878 to your computer and use it in GitHub Desktop.
Parser for projects having a stand at FOSDEM
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
#!/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