wrongmove/crawler/proof_of_concept/listings.py
Kadir 0801aaf200
More ruff fixes (#2)
* adding ruff auto check for pull requests as well as fixing all ruff errors

* More ruff fixes: forgot half of the ruff checks

Forgot to do a git add all :D

---------

Co-authored-by: Kadir <git@k8n.dev>
2025-09-14 19:44:03 +01:00

67 lines
1.6 KiB
Python

import requests
headers = {
"Host": "api.rightmove.co.uk",
# 'Accept-Encoding': 'gzip, deflate, br',
"User-Agent": "okhttp/4.10.0",
"Connection": "close",
}
params = {
"locationIdentifier": "POSTCODE^4228216",
"channel": "BUY",
"page": "1",
"numberOfPropertiesPerPage": "25",
"radius": "3.0",
"sortBy": "distance",
"includeUnavailableProperties": "false",
"propertyTypes": "flat",
"mustHave": "newHome", # added manually later
"dontShow": "sharedOwnership,retirement",
"minPrice": "150000",
"maxPrice": "500000",
"minBedrooms": "2",
"maxBedrooms": "2",
"apiApplication": "ANDROID",
"appVersion": "3.70.0",
}
response = requests.get(
"https://api.rightmove.co.uk/api/property-listing",
params=params,
headers=headers,
verify=False,
)
headers = {
"Host": "api.rightmove.co.uk",
# 'Accept-Encoding': 'gzip, deflate, br',
"User-Agent": "okhttp/4.10.0",
"Connection": "close",
}
params = {
"locationIdentifier": "POSTCODE^4228216",
"channel": "BUY",
"page": "2",
"numberOfPropertiesPerPage": "25",
"radius": "3.0",
"sortBy": "distance",
"includeUnavailableProperties": "false",
"propertyTypes": "flat",
"dontShow": "sharedOwnership,retirement",
"minPrice": "150000",
"maxPrice": "600000",
"minBedrooms": "2",
"maxBedrooms": "2",
"apiApplication": "ANDROID",
"appVersion": "3.70.0",
}
response = requests.get(
"https://api.rightmove.co.uk/api/property-listing",
params=params,
headers=headers,
verify=False,
)