Opensource scraper
-
Download the project
-
Create a postgres database
-
Fill out the .env file
-
Paste
pip install -r requirements.txt
in ur terminal
- dumps folder, where dumps will be saved in dump-date- format
- Models where the model of our table is described
find_car_info.py
, where the functionsfetch_car_data_from_page()
,valid_car_number()
,find_phone_number()
,fetch_car_data_from_site()
are locatedfetch_car_data_from_site()
- function that transfers links to pages that need to be parsedfetch_car_data_from_page()
- page parsingvalid_car_number()
- in order to remove unnecessary information from the answerfind_phone_number()
- launches drivers to imitate a person to open a phone numbermain.py
- usingload_data_to_db()
we create migrations to the database,daily_task()
parses the page and dumps the database,schedule.every().day.at("15:30").do(daily_task)
makes all this run every day at the same time- normalize_data.py was created to convert data to the desired type