Simple CLI application to collect data from otomoto.pl and otodom.pl
Report Bug
·
Request Feature
[
{
"is_sponsored": true,
"title": "! Studio, 3 osoby, balkon, topowe wyko\u0144czenie!",
"location": "ul. Jana Kasprowicza, Ko\u0142obrzeg, ko\u0142obrzeski, zachodniopomorskie",
"url": "/pl/oferta/studio-3-osoby-balkon-topowe-wykonczenie-ID4eNS2",
"image_url": "https://ireland.apollo.olxcdn.com/v1/files/eyJmbiI6Im1neTc2bWg2Y2NjbzMtQVBMIiwidyI6W3siZm4iOiJlbnZmcXFlMWF5NGsxLUFQTCIsInMiOiIxNCIsInAiOiIxMCwtMTAiLCJhIjoiMCJ9XX0.B-NT5jkKj4RAlYV-XVVUKsS4iZmP9tQdz20XF9ZB1-U/image;s=1280x1024;q=80",
"details": {
"total_price": "518185z\u0142",
"price_per_meter": "18500z\u0142/m\u00b2",
"num_of_rooms": "1 pok\u00f3j",
"area": "28,01 m\u00b2"
}
},
[
{
"title": "Mercedes-Benz GLC 220 d 4-Matic AMG Line",
"url": "https://www.otomoto.pl/osobowe/oferta/mercedes-benz-glc-glc-220d-4matic-amg-night-premium-distronic-salon-pl-fv23-ID6G2ho4.html",
"image_url": "https://ireland.apollo.olxcdn.com/v1/files/eyJmbiI6ImJybzg0N2N3Mm50aS1PVE9NT1RPUEwifQ.eJBnMGCxy8p0QHWX74OPC9BMzAx_GWG2qvVKT2EGyYI/image;s=644x461",
"type_of_seller": null,
"price": "314 700",
"price_currency": "PLN",
"mileage": "23 772 km",
"fuel_type": "Diesel",
"gearbox": "Automatyczna",
"year": "2022 "
},
- Scrape data from otodom.pl and otomoto.pl
- Parse scraped data and export them to JSON file
- Easy configuration, just use url with all filters included
- Python
- Typer
- requests
- beautifulsoup4
Clone repository
git clone https://github.com/DEENUU1/otodom-otomoto-scraper.git
Create virtual env
python -m venv venv
Activate virtual env
.\venv\Scripts\activate
Install libraries
pip install -r requirements.txt
Change directory
cd app
Run script
python main.py <url> <page_limit> (default 1) <export_to> (default json)
For example:
python main.py https://www.otodom.pl/pl/wyniki/sprzedaz/mieszkanie/cala-polska?viewType=listing
python main.py https://www.otomoto.pl/osobowe 10 json
See LICENSE.txt
for more information.