-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings.yaml
More file actions
51 lines (48 loc) · 2.14 KB
/
Copy pathsettings.yaml
File metadata and controls
51 lines (48 loc) · 2.14 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
# General scraper settings
base_url: "https://www.threads.com"
timeout: 15
use_offline: false # online mode (may require cookie/proxies if blocked)
use_proxies: false # set true to use proxies from proxies.json
limit: 99
scrape_replies: true
replies_limit: 99
replies_workers: 4
skip_zero_replies: true
dump_raw_items: true
dump_replies_raw: true
replies_use_persistent_profile: true
replies_http_first: true
replies_http_only: true
# Use a crawler UA to encourage SSR payloads for reply pages (HTTP-only mode)
replies_http_user_agent: "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"
# Optional: use a crawler UA for profile pages as well (helps surface latest posts)
profile_http_user_agent: "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"
# Optional: how many post pages to fetch when profile HTML only lists links
profile_post_page_fetch_max: 200
# Optional: disable Playwright for profile pages (avoid browser launch)
profile_http_only: false
# Optional: best-effort API pagination pages to attempt in HTTP-only mode
profile_http_max_pages: 5
# Debug: dump profile HTML + payloads
dump_profile_raw: true
# Online mode tuning (optional)
max_scrolls: 999 # increase if you want more posts (slower)
scroll_pause_ms: 1200 # wait after each scroll to let XHR complete
page_settle_ms: 2500 # initial wait after first load
stagnant_scrolls: 3 # stop after this many scrolls with no new posts
# Replies scraping tuning (optional)
replies_max_scrolls: 999
replies_scroll_pause_ms: 200
replies_page_settle_ms: 500
replies_stagnant_scrolls: 3
# Logged-in / session options (recommended when you hit public visibility limits)
# Option A: set THREADS_COOKIE in .env (copy request Cookie header from a logged-in browser)
# Option B: set a persistent Playwright profile directory and login once
playwright_headless: false
playwright_user_data_dir: "data/playwright-profile" # e.g. "data/playwright-profile" (set headless=false to login interactively)
# Default usernames used if none provided via CLI
usernames:
- zuck
- mosseri
# Optional cookie (can also be set via .env as THREADS_COOKIE)
cookie: ""