-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
56 lines (50 loc) · 1.61 KB
/
config.py
File metadata and controls
56 lines (50 loc) · 1.61 KB
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
50
51
52
53
54
55
56
# Concurrency and crawl limits
CONCURRENT_WORKERS = 4
MAX_DEPTH = 2
# Browser
HEADLESS = False
# When a parent path produces more than this many distinct last-segment values,
# treat the last segment as a dynamic slug and collapse it to ':slug'.
SLUG_CARDINALITY_THRESHOLD = 5
# Wait for manual login before crawling
WAIT_FOR_LOGIN = True
# Stealth mode selection: "stealth" uses a larger set of flags; "standard" is smaller
# "stealth" or "standard"
STEALTH_MODE = "standard"
# Browser args for the two modes
STANDARD_ARGS = [
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-dev-shm-usage",
"--no-first-run",
"--disable-blink-features=AutomationControlled",
]
STEALTH_ARGS = [
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-dev-shm-usage",
"--no-first-run",
"--no-zygote",
"--disable-blink-features=AutomationControlled",
"--disable-infobars",
"--disable-background-networking",
"--disable-background-timer-throttling",
"--disable-backgrounding-occluded-windows",
"--disable-breakpad",
"--disable-client-side-phishing-detection",
"--disable-component-extensions-with-background-pages",
"--disable-default-apps",
"--disable-extensions",
"--disable-features=TranslateUI",
"--disable-hang-monitor",
"--disable-ipc-flooding-protection",
"--disable-popup-blocking",
"--disable-prompt-on-repost",
"--disable-renderer-backgrounding",
"--disable-sync",
"--force-color-profile=srgb",
"--metrics-recording-only",
"--safebrowsing-disable-auto-update",
"--password-store=basic",
"--use-mock-keychain",
]