mirror of
https://github.com/KUlishevgeniy/c22712.git
synced 2026-09-24 08:00:22 +00:00
Update parsing пивоварни.py
This commit is contained in:
@@ -27,7 +27,7 @@ item.pop(8)
|
|||||||
connection = psycopg2.connect(host='localhost', dbname='breweries', user='postgres', password='Q1w2e3r4t5')
|
connection = psycopg2.connect(host='localhost', dbname='breweries', user='postgres', password='Q1w2e3r4t5')
|
||||||
cursor=connection.cursor()
|
cursor=connection.cursor()
|
||||||
create = """ create table Information
|
create = """ create table Information
|
||||||
(id primary key int, Name varchar(100), Place varchar(150), Sorts varchar(15), AmountOfRatings varchar(25),
|
(id int primary key, Name varchar(100), Place varchar(150), Sorts varchar(15), AmountOfRatings varchar(25),
|
||||||
Rating varchar(10), ImageLink varchar(150));"""
|
Rating varchar(10), ImageLink varchar(150));"""
|
||||||
cursor.execute(create)
|
cursor.execute(create)
|
||||||
connection.commit()
|
connection.commit()
|
||||||
@@ -40,4 +40,4 @@ for i in range(20):
|
|||||||
cursor.execute('select * from Information')
|
cursor.execute('select * from Information')
|
||||||
print(cursor.fetchall())
|
print(cursor.fetchall())
|
||||||
cursor.close()
|
cursor.close()
|
||||||
connection.close()
|
connection.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user