Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vicoliveres committed Mar 9, 2018
1 parent 82eb8c7 commit 8f4cbc8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scraper.py
Expand Up @@ -13,10 +13,13 @@

for restaurant in restaurants:
record = {}
name = restaurant.cssselect("h2")
address = restaurant.cssselect("div.address")
postcode = restaurant.cssselect("div.address div")

record['Name'] = restaurant.cssselect("h2").text
record['Address'] = restaurant.cssselect("div.address").text
record['Postcode'] = restaurant.cssselect("div.address div").text
record['Name'] = name.text
record['Address'] = address.text
record['Postcode'] = postcode.text
record['Company'] = "Wagamama"

print record, '------------'
Expand Down

0 comments on commit 8f4cbc8

Please sign in to comment.