Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
psychemedia committed Sep 24, 2015
1 parent df6471a commit 537a475
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scraper.py
Expand Up @@ -86,6 +86,7 @@ def licenseScraper(ltype='Premises'):
r=requests.post(url,data=params)

df=licenseConsultations(r.content)
if len(df)==0: return
latlonlookup={}
for addr in df['address'].unique():
g=geocoder2(addr)
Expand All @@ -107,6 +108,7 @@ def licenseScraper(ltype='Premises'):
t='IWLICENSEAPPLICATIONS'
if len(df)>0:
scraperwiki.sqlite.save(unique_keys=['number'],table_name=t, data=df.to_dict(orient='records'))
return

for l in ['Premises','Sex Establishments','Street Trading','Street Furniture']:
licenseScraper(l)

0 comments on commit 537a475

Please sign in to comment.