CLI to Scrape OLX for Ad listing (Optimized for Car/Motocycle ads)
- Create a virtual enviroment for the repo & activate it
python -m venv venv
cd venv
Scripts\activate.bat
- Install the scraper
pip install olx-web-scraper
- To get scraping, simple run the following on your prefered terminal:
olx_web_scraper <filename without extension>
Eg:
python olx_web_scraper scraped_data
- Next, input the URL to scrape
OLX Web Scraper!
URL: https://www.olx.in/kerala_g2001160/q-interceptor-650
- This will then scrape all the listing available and save to a file named scraped_data.csv in your root folder.