Suppose you are a used-car dealer and you would like to find these used cars in good shape with a relatively low price and secure the deal as soon as possible otherwise the target will be the fruits of your competitors. So, knowing avaliability of target cars and closing the deal as soon as possible is the key of making money from the used cars business for dealers. If you are a buyer who want to buy or sale a used car in Boston, you can get an rough price from website like Kelley Blue Book. However, these prices usually are among certain range. The diffference between max and min prices could be thousands us dollars. So the estimated price is not specific and good enough for our money-saving or money earing propuses, which may be the primary reasons why we want to buy or sell a used car. Under this circumstance, knowing the fair and detailed price of the car is crucial because thousands or even hundard dollars matters. You can collect the used car information on craigslist to calculate the average price of the same type cars in Boston.
Tech Stack
- Windows 10
- Python 3.6
- Jupyter Notebook
- Python Modules and Libraries: Beautifulsoup, Request, CSV
Build a Python Scraping Program that collecting the craigslist used car information including posting date, price and car type then write into csv file for further analysis.
Building Process
- Write a simple program V1 scrape one craigslist page
- Define an advanced scraping program V2 with error handling function
- Building a scraping list L containing multiple webpages of craigslist
- Write the data into CSV file after V2 scraped all the pages in L