wip
This commit is contained in:
parent
f1601257c7
commit
c2070693fb
68 changed files with 2305 additions and 212 deletions
|
|
@ -26,14 +26,14 @@ RETRY_BASE_DELAY = 2.0
|
|||
DETAIL_FETCH_CONCURRENCY = int(os.environ.get("DETAIL_FETCH_CONCURRENCY", "8"))
|
||||
REQUESTS_PER_SECOND = float(os.environ.get("REQUESTS_PER_SECOND", "10"))
|
||||
GRID_CELL_SIZE = 0.01 # degrees for postcode spatial index
|
||||
MAX_BEDROOMS = 20 # sanity cap — values above this are almost certainly parsing errors
|
||||
MAX_BEDROOMS = 20 # sanity cap: values above this are almost certainly parsing errors
|
||||
|
||||
TYPEAHEAD_URL = "https://los.rightmove.co.uk/typeahead"
|
||||
SEARCH_URL = "https://www.rightmove.co.uk/api/property-search/listing/search"
|
||||
RIGHTMOVE_BASE = "https://www.rightmove.co.uk"
|
||||
# Detail page (plain HTTPS GET, no Cloudflare). Its window.__PAGE_MODEL embeds
|
||||
# propertyData.address.{outcode,incode}, which together form the property's TRUE
|
||||
# full postcode — the search API only exposes the outcode. {id} is the numeric
|
||||
# full postcode. The search API only exposes the outcode. {id} is the numeric
|
||||
# listing id from the search response.
|
||||
RIGHTMOVE_DETAIL_URL = "https://www.rightmove.co.uk/properties/{id}"
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ RIGHTMOVE_MAX_DETAILS_PER_OUTCODE = 4000 # max detail-page fetches per outcode
|
|||
# keep on APPROXIMATE pins (new-builds/developments) where Rightmove
|
||||
# deliberately fuzzes the coordinates. Degrades safely: when `pinType` is absent
|
||||
# from the search payload, nothing is skipped (behaviour is unchanged), so this
|
||||
# is only a speed-up to the extent the field is present — verify against a live
|
||||
# is only a speed-up to the extent the field is present. Verify against a live
|
||||
# search response before relying on the saving.
|
||||
RIGHTMOVE_SKIP_DETAILS_FOR_ACCURATE_PINS = (
|
||||
os.environ.get("RIGHTMOVE_SKIP_DETAILS_FOR_ACCURATE_PINS", "1") != "0"
|
||||
|
|
@ -94,7 +94,7 @@ GLUETUN_API_KEY = "My8AbvnKhfyFdRhpTVfoTfa5DkAMmg8K"
|
|||
GLUETUN_MAX_ROTATIONS = 0 # max egress-IP rotations per Cloudflare challenge
|
||||
|
||||
# Zoopla fetcher: "flaresolverr" (default) solves Cloudflare via the FlareSolverr
|
||||
# sidecar (docker-compose.yml) and needs no display/VNC — verified to return the
|
||||
# sidecar (docker-compose.yml) and needs no display/VNC, verified to return the
|
||||
# RSC flight stream with postcode + coordinates; "camoufox" drives a local
|
||||
# anti-fingerprint browser (needs an interactive solve on datacenter IPs).
|
||||
ZOOPLA_FETCHER = os.environ.get("ZOOPLA_FETCHER", "flaresolverr")
|
||||
|
|
@ -214,3 +214,16 @@ PROPERTY_TYPE_MAP = {
|
|||
CHANNELS = [
|
||||
{"channel": "BUY", "transactionType": "BUY", "sortType": "2"},
|
||||
]
|
||||
|
||||
# A second search pass that restricts the BUY channel to new-build developments
|
||||
# via Rightmove's `mustHave=newHome` filter, so new homes (which can rank low in
|
||||
# the default resale sort) are captured thoroughly. The API still echoes
|
||||
# `?channel=RES_BUY` in every listing URL regardless of this filter, so new
|
||||
# builds are identified by the per-listing `development` flag in
|
||||
# `transform_property`, which re-stamps the URL channel as RES_NEW.
|
||||
NEW_HOMES_CHANNEL = {
|
||||
"channel": "BUY",
|
||||
"transactionType": "BUY",
|
||||
"sortType": "2",
|
||||
"extra_params": {"mustHave": "newHome"},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue