Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiblix100 committed May 15, 2017
1 parent 2b88687 commit 0863f99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraper.py
Expand Up @@ -16,11 +16,11 @@ def scrape_and_look_for_next_link(url):
html = scraperwiki.scrape(url)
print html
root = lxml.html.fromstring(html)
rows = root.cssselect("table tr") # selects all <tr> blocks within <table class="data">
rows = root.cssselect("tr") # selects all <tr> blocks within <table class="data">
for row in rows:
# Set up our data record - we'll need it later
record = {}
table_cells = row.cssselect("td")
table_cells = row.cssselect("td p.ex1")
if table_cells:
record['RaceCourse'] = table_cells[0].text_content
record['Information'] = table_cells[1].text_content
Expand Down

0 comments on commit 0863f99

Please sign in to comment.