Created
August 6, 2017 21:30
-
-
Save Zwirzu/a8e3cc24c4519905f643bcd337a332a2 to your computer and use it in GitHub Desktop.
Gist
This file contains hidden or 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
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