Pattern matching, foxnews request with header
This commit is contained in:
@@ -215,6 +215,10 @@ def initialize_data():
|
|||||||
print(query)
|
print(query)
|
||||||
cur.execute(query)
|
cur.execute(query)
|
||||||
|
|
||||||
|
# Connect to an existing database
|
||||||
|
with psycopg.connect(connection_info) as conn:
|
||||||
|
# Open a cursor to perform database operations
|
||||||
|
with conn.cursor() as cur:
|
||||||
# Feeds, URL host, keyword search
|
# Feeds, URL host, keyword search
|
||||||
for search_type, list_searches in data_json.get("SEARCH", {}).items():
|
for search_type, list_searches in data_json.get("SEARCH", {}).items():
|
||||||
for search in list_searches:
|
for search in list_searches:
|
||||||
|
|||||||
Reference in New Issue
Block a user