Skip to content

BeautifulSoup web-scraper for extracting average prices of desired cars

Notifications You must be signed in to change notification settings

mateuszgrzybek/car-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

car-scraper

Web-scraping script that extracts data from a given url aquired by running a search query on 'https://www.otomoto.pl'. After providing the script with a link, the script will scrape the given page and then look for the next page in the html code. The loop runs for each consecutive page until the next url is nowhere to be found (the container returns NoneType). After that, the script saves all the scraped data to a .csv file which is then used to create data structures necessary to plot charts using pygal. The repository contains three main .py files. The main file is 'scrap.py', which imports user-defined functions from 'functions.py' and 'graph.py'.

Installation

Run:

python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt

Done. You can now run python3 scrap.py and let the scraper work.

Requirements

All the packages required to run the script properly are defined in the requirements.txt file.

Sample urls

About

BeautifulSoup web-scraper for extracting average prices of desired cars

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages