Skip to content

Instantly share code, notes, and snippets.

View wclenhardt's full-sized avatar

Chris Lenhardt wclenhardt

View GitHub Profile
@wclenhardt
wclenhardt / scrape_Wikipedia_tables.py
Last active August 5, 2017 17:40 — forked from wassname/scrape_Wikipedia_tables.py
Scrape a table from wikipedia using python. Allows for cells spanning multiple rows and/or columns. Outputs csv files for each table
# -*- coding: utf-8 -*-
"""
Scrape a table from wikipedia using python. Allows for cells spanning multiple rows and/or columns. Outputs csv files for
each table
"""
#20170805 - Forked this to use as part of a larger project to create a 'quiz' to learn geographic trivia. Made some updates to the urllib syntax.
from bs4 import BeautifulSoup
import urllib.request, urllib.parse, urllib.error
import os