Permalink
Browse files

Update scraper.py

Articles now an array of articles
  • Loading branch information...
nixed committed Aug 24, 2015
1 parent eb233f8 commit e7e7a98d0ad0012d447f621512e64bf4d99606c9
Showing with 3 additions and 3 deletions.
  1. +3 −3 scraper.py
View
@@ -15,10 +15,9 @@
else:
box_title = None # if no infobox title is provided, program returns the first one on the page
"""
article_title = "Brazil"
article_titles = ["M16A1", "M16A2", "M4A1", "M16A4"]
box_title = None
#Build a regexp to get the source artery from the artery infobox
exp = r'\{\{' # the opening brackets for the infobox
exp = exp + r'\s*' # any amount of whitespace
@@ -109,6 +108,7 @@ def run(article_title):
data = parse_infobox_text(get_infobox_from_text(article_text))
return data
scraperwiki.sqlite.save(unique_keys=("Name",), data = run(article_title))
for articletitle in articletitles:
scraperwiki.sqlite.save(unique_keys=("Name",), data = run(article_title))

0 comments on commit e7e7a98

Please sign in to comment.