Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
66 lines (56 loc) · 3.43 KB
/
Copy path.env.example
File metadata and controls
66 lines (56 loc) · 3.43 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
57
58
59
60
61
62
63
64
65
66
# farfetch-scraper — configuration
#
# cp .env.example .env
# $EDITOR .env
# python3 env_config.py # shows what got picked up, without printing secrets
#
# Everything here is OPTIONAL. With an empty .env the scraper still runs against
# farfetch.com using a browser it launches itself — see the README.
#
# .env is in .gitignore. Keep it that way.
# ── 2Captcha API key ──────────────────────────────────────────────────────────
# One key, four separately-billed products: captcha solving, the Scraping
# Browser API, proxies and fingerprints. Get it from the dashboard:
# https://2captcha.com/enterpage
#
# Needed for: --twocaptcha-key (solving), --fingerprint, scraper_api_client.py.
# Not needed to run a local browser against a listing page.
TWOCAPTCHA_KEY=
# ── Scraping Browser API endpoint ─────────────────────────────────────────────
# A managed Chrome reached over a CDP WebSocket, with proxy and fingerprint
# included. Backs --cdp-endpoint.
# https://2captcha.com/scraper/browser-api/
#
# Format:
# ws://{login}-zone-scraping_browser-country-{cc}-pid-{profileId}:{password}@cb.2captcha.com:9222
#
# `country-` decides the exit country, and Farfetch keys currency and language
# off the exit IP — so this is also how you choose USD/English vs EUR/localised.
# `pid-` is a profile: one live connection per profile, and each new pid mints a
# profile against an account-wide cap. Reuse pids rather than generating one per
# run.
FARFETCH_CDP_ENDPOINT=
# ── Proxy ─────────────────────────────────────────────────────────────────────
# Backs --proxy, for a browser this project launches itself. Residential,
# datacenter, ISP, mobile and SOCKS5, with country/state/city targeting:
# https://2captcha.com/proxy (also sold as 2prx.com — same product)
#
# Ignored when FARFETCH_CDP_ENDPOINT is set: the remote browser has its own.
# Match the proxy's country to your fingerprint's — a US fingerprint arriving on
# a German IP is a contradiction that is cheap to detect.
FARFETCH_PROXY=
# ── Default listing URL ───────────────────────────────────────────────────────
# Optional. Saves retyping the same URL; --url still overrides it.
# Use a FILTERED category URL, not the bare /shopping/kids/items.aspx hub — the
# hub carries no product JSON-LD and returns zero rows.
FARFETCH_URL=
# ── Webhook (optional) ────────────────────────────────────────────────────────
# Backs --webhook. When set, the run POSTs its summary here on finish — the same
# fields as the .meta.json sidecar, plus the exit code — INCLUDING when the run
# fails, which is the case worth being told about. It never fails the run and is
# never logged.
#
# Set it HERE rather than on the command line: most webhook URLs carry their
# token in the path (hooks.slack.com/services/T000/B000/XXXXXXXX), so a URL in
# argv is readable by anything that can run `ps` and lands in shell history.
FARFETCH_WEBHOOK=