Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- conn = sqlite3.connect("atlanta.db")
- cursor = conn.cursor()
- def database(kor):
- try:
- cursor.execute("""CREATE TABLE information
- (Date text, Complex text, URL text,
- District text, Site text, Address text, Company text,
- Price_min text, Price_max text,
- Queue text, Room text, Min_square text, Max_square text,
- Floor text, Min_price text, Max_price text, Class text,
- Houses text, Sections text, Stages text, Technology text,
- Walls text, Warming text, Heating text, Height text, Apartments text,
- Condition text, Territory text, Parking text, Service text, Status text, Latitude text, Longitude text)
- """)
- cursor.executemany("INSERT INTO information VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", kor)
- conn.commit()
- except sqlite3.OperationalError:
- cursor.executemany("INSERT INTO information VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", kor)
- conn.commit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement