Parser for Cian.ru real estate listings (Playwright-based)
Project description
cian-parser
Playwright-based parser for Cian.ru real estate listings.
Installation
pip install cian-parser
playwright install chromium
Quick start
from cian_parser import CianParser
with CianParser("Москва") as parser:
# Sale
flats = parser.get_flats(deal_type="sale", rooms=(1, 2))
# Long-term rent
rent = parser.get_flats(deal_type="rent_long", rooms="all")
# Short-term rent
daily = parser.get_flats(deal_type="rent_short")
# Suburban
houses = parser.get_suburban("house", deal_type="sale")
# New construction
newbuilds = parser.get_newobjects()
API
CianParser(location, proxies=None)
- location — city name (e.g.
"Москва"). Seecian_parser.list_locations()for all options. - proxies — optional proxy URL string for Playwright.
get_flats(deal_type, rooms="all", with_saving_csv=False, with_extra_data=False, additional_settings=None)
| Parameter | Type | Description |
|---|---|---|
deal_type |
str |
"sale", "rent_long", or "rent_short" |
rooms |
int | str | tuple |
1–5, "studio", "all", or tuple like (1, 2, "studio") |
with_saving_csv |
bool |
Save results to CSV |
with_extra_data |
bool |
Parse detail pages for extra fields (slower) |
additional_settings |
dict |
Filters: min_price, max_price, metro, district, sort_by, etc. |
get_suburban(suburban_type, deal_type, ...)
Same parameters as get_flats, plus:
| Parameter | Type | Description |
|---|---|---|
suburban_type |
str |
"house", "house-part", "land-plot", or "townhouse" |
get_newobjects(with_saving_csv=False)
Parse new construction listings.
Helpers
from cian_parser import list_locations, list_metro_stations, list_districts
list_locations() # [("Москва", "1"), ("Санкт-Петербург", "2"), ...]
list_metro_stations() # {"Москва": [("Арбатская", "1"), ...], ...}
list_districts("Москва") # [("Арбат", "13"), ...]
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cian_playwright-2.0.0.tar.gz
(33.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cian_playwright-2.0.0.tar.gz.
File metadata
- Download URL: cian_playwright-2.0.0.tar.gz
- Upload date:
- Size: 33.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e5744456f2be0b02bcf8cd04fb6c0d499e4c2f6139692a8ea1a8bdb98e44ab6
|
|
| MD5 |
d8ea29cf9e9d181c0d576965039bfa8b
|
|
| BLAKE2b-256 |
834670655ad6f26b5039e4f80fcb137b02fc243e6f77eee0c91f93932fcb286c
|
File details
Details for the file cian_playwright-2.0.0-py3-none-any.whl.
File metadata
- Download URL: cian_playwright-2.0.0-py3-none-any.whl
- Upload date:
- Size: 32.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
640ae295eee3be7dbcf6b1957f3707fc151a9996dc265356280ae8e99941f92a
|
|
| MD5 |
553f23c32b5c314abd5adba81a050f61
|
|
| BLAKE2b-256 |
fe02a845c0546fa8bd47662fd76dba08370254fc448f3b54a63f48443003a2dd
|