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.1.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.1.0.tar.gz.
File metadata
- Download URL: cian_playwright-2.1.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 |
3b4c3c792694b12f1abc5b87034bcf7b518b3444dc72b8eafedfd6ed74990244
|
|
| MD5 |
14f8ada92d6d0414e325feb08f5601e4
|
|
| BLAKE2b-256 |
977d0701f434166aa6cf443d38b1da384165e3511ce3c43f450a33dc7f4b6296
|
File details
Details for the file cian_playwright-2.1.0-py3-none-any.whl.
File metadata
- Download URL: cian_playwright-2.1.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 |
dd6e05006918199d5bac6415021a14abd13d410d56614eb43fdd72411430d3b8
|
|
| MD5 |
4cf615d2fa655b38eec65a1b9ddc80ee
|
|
| BLAKE2b-256 |
4e522858a75c48933204c825ef6dd3795261627a521869e0221870a741686d26
|