Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlotteMaher committed Jul 23, 2019
1 parent ef1bea0 commit 4b7980a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraper.py
Expand Up @@ -14,7 +14,7 @@ def scrape_table(root):
for row in rows:
# Set up our data record - we'll need it later
record = {}
table_cells = row.cssselect("td")
table_cells = row.cssselect("th")
if table_cells:
record['Release date'] = table_cells[0].text
record['Artist'] = table_cells[1].text
Expand Down Expand Up @@ -45,5 +45,5 @@ def scrape_table(root):
# call a function to scrape the first page in the series.
# ---------------------------------------------------------------------------
base_url = 'https://en.wikipedia.org/wiki/List_of_2019_albums'
starting_url = urlparse.urljoin(base_url, 'scraping-for-everyone/webpages/example_table_1.html')
#starting_url = urlparse.urljoin(base_url, 'scraping-for-everyone/webpages/example_table_1.html')
#scrape_and_look_for_next_link(starting_url)

0 comments on commit 4b7980a

Please sign in to comment.