-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
49 lines (46 loc) · 1.03 KB
/
config.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
41
42
43
44
45
46
47
48
49
import re
from dotenv import load_dotenv
import os
from localization import Location
load_dotenv()
# Places that are too far away (not worth considering)
BLACKLIST = [
"bemowo",
"bemowie",
"wilanow",
"wilanowie",
"ursus",
"ursusie",
"bielany",
"bielanach",
"wawer",
"wawrze",
"tarchomin",
"tarchominie",
"bialoleka",
"bialolece",
"brodno",
"brodnie",
"targowek",
"targowku",
"rembertow",
"rembertowie",
"goclaw",
"goclawiu",
"grodzisk",
"grodzisku",
"miedzylesie",
"miedzylesiu",
]
# Latitude and Longitude of location to use a center (PW MINI)
CENTER_LOCATION = Location(52.222188, 21.007188)
# Maximum acceptable distance from center location in km
MAXIMUX_DISTANCE = 10 # km
# Maximum acceptable full cost
MAXIMUM_COST = 3500 # PLN
# Optimal search URL
# Takes care of basic price filtering
SCRAPE_URL = os.getenv("SCRAPE_URL")
STREET_REGEX = re.compile(
r"(ul\.|ulicy|ulica|al\.|aleja|Ul\.|Ulica|Al\.|Aleja)\s*(([A-Z][a-z]+\s*))+"
)