-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconf.py
40 lines (32 loc) · 1.86 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
""" Config file with parameters. """
import os
from dotenv import load_dotenv
load_dotenv()
NOMAD_LIST_URL = "https://nomadlist.com"
NOMAD_LIST_SCROLL_PAUSE_TIME = 2
NOMAD_LIST_DELAY_AFTER_REQUEST = 2
NOMAD_LIST_REQUESTS_BATCH_SIZE = 20
CHROME_DRIVER_PATH = os.getenv('NOMAD_LIST_CHROME_DRIVER_PATH')
LOG_FILE = "files/logs.log"
LOG_FORMAT = '%(asctime)s-%(levelname)s-FILE:%(filename)s-FUNC:%(funcName)s-LINE:%(lineno)d-%(message)s'
JSON_FILENAME = "files/data.json"
LOGGER_LEVEL = "INFO"
PAGE_SOURCE = "files/page_source.html"
LOAD_HTML_FROM_DISK = False
SCROLL = True
HEADERS = {
'user-agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36",
'cookie': "ref=weremoto; visit-count=1; last_tested_internet_speed=2020-03-13_x; __stripe_mid=0adfa558-f217-49fe-8f7c-7c769760f498b8f7c4; visit-count=2; login_by_email_client_hash=6e693f5e751a957575c6c6bd664bba4a; login_url=https://nomadlist.com/?join=nomadlist; logged_in_hash=fccb1ad6e406b0111d55512cad8ae099_4885b578c08d502e2c6b6ae23d523bb26949c16e; ask_to_connect_instagram_hide=x; filters-folded=no; dark_mode=on; dark_mode_js_test=on; PHPSESSID=nba5obbj3eb9qn9pe2ch25evi1; last_tested_internet_speed=2021-07-25_x"
}
MYSQL = {
'host': os.getenv('NOMAD_LIST_MYSQL_HOST') or 'localhost',
'user': os.getenv('NOMAD_LIST_MYSQL_USER') or 'root',
'password': os.getenv('NOMAD_LIST_MYSQL_PASSWORD') or '',
'database': os.getenv('NOMAD_LIST_MYSQL_DATABASE') or 'nomad_list'
}
AVIATION_STACK = {
'uri': os.getenv('AVIATION_STACK_URI') or 'http://api.aviationstack.com/v1/',
'access_key': os.getenv('AVIATION_STACK_ACCESS_KEY') or '36117c41b6482d630207ffc137858e66',
'countries_filename': os.getenv('AVIATION_STACK_COUNTRIES_FILENAME') or 'files/countries.json',
'cities_filename': os.getenv('AVIATION_STACK_CITIES_FILENAME') or 'files/cities.json',
}