Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
oddjones committed Oct 30, 2014
1 parent 2e612e5 commit 5381b07
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions scraper.py
Expand Up @@ -19,11 +19,13 @@
table_div = soup.find("div",{"id" : "property_table_109"})
if table_div:
ks_table = table_div.find("table")
rows = ks_table.findall("tr")
for row in rows:
record={}
table_cells = row.findall("td")
if table_cells:
record['id'] = table_cells[1].string
record['name'] = table_cells[0].string
record['price'] = table_cells[2].find("span").string
print ks_table

#rows = ks_table.findall("tr")
#for row in rows:
#record={}
#table_cells = row.findall("td")
#if table_cells:
#record['id'] = table_cells[1].string
#record['name'] = table_cells[0].string
#record['price'] = table_cells[2].find("span").string

0 comments on commit 5381b07

Please sign in to comment.