1
0
Fork 0

Move session to top of file.

master
voussoir 2020-11-11 21:31:33 -08:00
parent c0a59059f5
commit b16c096dfb
1 changed files with 3 additions and 3 deletions

View File

@ -20,6 +20,9 @@ HEADERS = {
'User-Agent': f'voussoir/hnarchive v{VERSION}.',
}
session = requests.Session()
session.headers.update(HEADERS)
DB_INIT = '''
PRAGMA user_version = 1;
CREATE TABLE IF NOT EXISTS items(
@ -67,9 +70,6 @@ def int_or_none(x):
# API ##############################################################################################
session = requests.Session()
session.headers.update(HEADERS)
def get(url, retries=1):
start_time = time.time()