banner
肥皂的小屋

肥皂的小屋

github
steam
bilibili
douban
tg_channel

Python - Scraping Douban TOP 250 Movie Information

Cause#

Recently during my internship, I was required to find a website to scrape and store data into an excel spreadsheet.

I also filter movies based on Douban's TOP250, and manually flipping pages is too cumbersome, so I decided to scrape it.

[2019-09-02 Update] Later, I needed to do an assignment defense, so I changed it to store the data in a mysql database.

Code Implementation#

Unlike most scraping articles online, what I want is the plot summary information for each movie.

So I need to first get the link for each movie, and then scrape each movie individually.

The complete code is as follows:

The demonstration gif is as follows:

image

Reference articles:

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.