Skip to content

Scrape car offers from OTOMOTO․pl & OLX․pl and run IFTTT automation (eg. send email; add a to-do task) when new car(s) matching search criteria is found. With support for native macOS & Windows 10 notifications.

License

Notifications You must be signed in to change notification settings

KrzesloSzatan/otomoto_olx-scraper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

otomoto-scraper

Orginates from https://github.com/vardecab/otomoto_olx-scraper

Scrape car offers from OTOMOTO․pl when new car(s) matching search criteria is found. With support for native Windows 10 notifications. In output folder you can find diff2... file which consists a change that happened, if there is new car it will show "+ url_to_new_car, price, VIN". If the car was sold it shows "- url_to_new_car, price, VIN". If there is a price change it will show both in one file with the same urls but different price. It will also create a screenshot of the car page so you can check which one exactly it is/was. Screenshot is taken only once, when the car appears for the first time to the script, so any changes to the price will not be screenshotted again.

This one was redone by me only for OTOMOTO. I havent touched OLX so it works (or not?) as in the source repo.

How to use

Windows

⚠️ First run will create all the necessary folders and gather first data, so there will be no notification since only after second run comparison will be possible. If you have not created .\icons folder before now is the time to put .png file inside and use it for notification which will come after second run. ⚠️

Run it with parameters like below:

parser.add_argument('--url', '-u') # This is the URL that you get from your browser after choosing all the filters on Otomoto site

parser.add_argument('--title', '-t') # This is the title for Windows notifications

parser.add_argument('--icon', '-i') # Icon name that has to be placed in .\otomoto\icons folder (folder can be created manually before first run or it will be created by script after first run. Then you have to put your icon inside this folder. Icons have to be in .png. For best look img has to be square. Ex: name.png -> --icon "name")

parser.add_argument('--prefix', '-p') # Folder name for where all the scraped data will be stored for this search (Ex. --prefix "make" -> .\otomoto\make, --prefix "mazda" -> .\otomoto\mazda, --prefix "bmw" -> .\otomoto\bmw, etc. )

Ex:

python3 .\otomoto.py --url "https://www.otomoto.pl/osobowe/mazda/mx-5/od-2010?search%5Bfilter_enum_fuel_type%5D%5B0%5D=petrol&search%5Bfilter_enum_fuel_type%5D%5B1%5D=petrol-lpg&search%5Bfilter_enum_damaged%5D=0&search%5Bfilter_float_price%3Ato%5D=50000&search%5Border%5D=created_at_first%3Adesc&search%5Badvanced_search_expanded%5D=true" --title "Mazda MX-5" --icon "mazda" --prefix "mazda"

License

Acknowledgements

Modules

Stack Overflow

Other

About

Scrape car offers from OTOMOTO․pl & OLX․pl and run IFTTT automation (eg. send email; add a to-do task) when new car(s) matching search criteria is found. With support for native macOS & Windows 10 notifications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%