Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
LeifGreiss committed Dec 2, 2017
1 parent a564f54 commit c906988
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scraper.py
Expand Up @@ -10,10 +10,10 @@ def scrape_table(root):
record = {}
table_cells = row.cssselect("td") #In the row use cssselect to select for td
if table_cells:
record['Artist'] = table_cells[0].text_content
record['Album'] = table_cells[1].text_content
record['Released'] = table_cells[2].text_content
record['Sales m'] = table_cells[4].text_content
record['Artist'] = table_cells[0].text
record['Album'] = table_cells[1].text
record['Released'] = table_cells[2].text
record['Sales m'] = table_cells[4].text
# Print out the data we've gathered
print record, '------------'
# Finally, save the record to the datastore - 'Artist' is our unique key
Expand Down

0 comments on commit c906988

Please sign in to comment.