Skip to content

Instantly share code, notes, and snippets.

@Zwirzu
Created August 6, 2017 21:30
Show Gist options
  • Save Zwirzu/a8e3cc24c4519905f643bcd337a332a2 to your computer and use it in GitHub Desktop.
Save Zwirzu/a8e3cc24c4519905f643bcd337a332a2 to your computer and use it in GitHub Desktop.
Gist
import urllib2
import csv
from bs4 import BeautifulSoup
baseurl = 'http://www.planecrashinfo.com'
dburl = 'http://www.planecrashinfo.com/database.htm'
page = urllib2.open(dburl)
soup = BeautifulSoup(page)
years_a = soup.findAll("a")
years = []
#Add links to list years without last link
for i in [-1]:
i.get('href')
years.append(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment