Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SelectSoft committed Jul 28, 2019
1 parent 880a689 commit 57b87b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scraper.py
Expand Up @@ -31,10 +31,11 @@
import sqlite3

base_data = pd.read_csv("http://tjv.pristupinfo.hr/?sort=1&page=1&download" ,error_bad_lines=False,sep=';',index_col='Rb.')
base_data.columns = ['entity_name', 'vat_number', 'postal_address', 'zip_code', 'city', 'telephone', 'telefax','website', 'email', 'foi_officer_name', 'foi_officer_telephone','foi_officer_email', 'founder', 'legal_status', 'topics','last_updated']

conn = sqlite3.connect("data.sqlite")
# Naziv tijela
conn.execute("CREATE TABLE if not exists data ('entity_name', 'OIB', 'Adresa', 'Br. pošte', 'Grad', 'Telefon', 'Fax','Www', 'E-mail', 'Ime i prezime službenika', 'Tel. službenika','E-mail. službenika', 'Osnivač', 'Pravni status', 'Djelatnost','Zadnja izmjena')")

conn.execute("CREATE TABLE if not exists data ('entity_name', 'vat_number', 'postal_address', 'zip_code', 'city', 'telephone', 'telefax','website', 'email', 'foi_officer_name', 'foi_officer_telephone','foi_officer_email', 'founder', 'legal_status', 'topics','last_updated')")

base_data.to_sql("data", conn, if_exists='replace', index=False)

0 comments on commit 57b87b2

Please sign in to comment.