Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Commit

Permalink
Force bs4 to use lxml instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Kelly committed Aug 16, 2015
1 parent 7a84fdb commit b60f343
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraping/new_mexico_tech_banweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def getTerm(semester, subjects, parser):
url = "http://banweb7.nmt.edu/pls/PROD/hwzkcrof.P_UncgSrchCrsOff?p_term="+t.getSemester()+"&p_subj="+subjectName.replace(" ", "%20")
print url
page = urllib2.urlopen(url)
soup = BeautifulSoup(page, "html.parser")
soup = BeautifulSoup(page, "lxml")
trs = soup.findAll("tr")
trs = trs[1:] #discard the retarded row that banweb is retarded about
print_verbose("adding subject "+subjectName)
Expand All @@ -179,7 +179,7 @@ def main(parser):

page = urllib2.urlopen(url)

soup = BeautifulSoup(page, "html.parser")
soup = BeautifulSoup(page, "lxml")

path = ""
if (type(parser.path) == type("")):
Expand Down

0 comments on commit b60f343

Please sign in to comment.