# amazon **Repository Path**: tonystz/amazon ## Basic Information - **Project Name**: amazon - **Description**: amazon car parts crawler - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2022-04-06 - **Last Updated**: 2025-09-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### Amazon Vehicle Parts crawler with request solution # Install [python](https://www.python.org/downloads/) # Install dependency 1. run `CTRL + R` to open **cmd.exe** 1. run `pip install -r requests.txt` in **cmd.exe** 1. run `pyhton db.py` to dump data to csv format in **cmd.exe** # start to crawler data 1. modify `inputs.py` to edit `Amazon` and year `infor` 1. run `pyhton crawler.py` to crawler car parts in **cmd.exe** 1. run `pyhton fits.py` to update car fits info in **cmd.exe** # error & debug # other 1. online view data: https://sqliteviewer.app/ 1. sqlite3 convert to csv: https://www.rebasedata.com/convert-sqlite-to-csv-online 1. sqlite3 op: ```shell sqlite3 data.db .schema parts; select * from parts; select * from parts where fit is not null; select asin, year,fit,count(*) as c from parts group by asin,year,fit order by c desc; select asin, year,fit,count(*) as c from parts group by asin,year,fit order by year desc; select asin, year,fit,count(*) as c from parts group by asin,year,fit order by asin,year desc; select asin, fit,count(*) from parts group by asin,fit order by asin; select asin, year,fit,count(*) as c from parts where fit is null group by asin,year,fit order by asin,year desc; select asin, year,fit,count(*) as c from parts where asin='B00EAOIKWC' group by asin,year,fit order by asin,year desc; .exit ``` getPartfinderView changed ```json {"asin":"B09S8K25HD","id":"automotive-pf-primary-view","inputSelections":[],"selectionType":"VehicleAttribute","selections":[{"id":"version","value":"1"},{"id":"flow","value":"vehicle-by-attributes"},{"id":"vehicleType","value":"automotive"},{"id":"year","value":"2014"},{"id":"makeId","value":"7"},{"id":"modelId","value":"6454"}]} ```