Nezha broke 1 billion in 5 days, why is it so popular, Python to analyze

640?wx_fmt=png

I don’t know if you have gone to the movies recently. Recently, friends around me are asking me for an animation movie called "Nezha: The Devil Boy Comes into the World". Without exception, everyone said it was very beautiful.


Looking at the recent WeChat search index, the search index is nearly 6 times higher than that of the popular TV series "Dear Loved One", and 22 times higher than that of Disney's "The Lion King", which is indeed very popular.

640?wx_fmt=jpeg


With a curious attitude, the editor went to Maoyan to look at it, and the results showed that the score was as high as 9.7 out of nearly 840,000 people . It is indeed a good drama after watching it, and it is worthwhile for me to crawl everyone's comments and conduct a wave of analysis to find something worthy of attention.


640?wx_fmt=png


1 Data Acquisition


The first is about data crawling. Data crawling is relatively simple. You only need to open the URL of this movie in Maoyan.com, and you can see the movie reviews below. In the developer mode, switch to the mobile terminal, and you can see the movie reviews. If you observe carefully, you can find that the movie reviews are dynamically loaded, as shown in the following figure:

640?wx_fmt=gif



For dynamic loading, you only need to observe carefully in the XHR under the network, and you can find the json data dynamically loaded by the webpage, which is the data we want to crawl. As shown below.


640?wx_fmt=png

(dynamic picture)

The next step is to use a simple crawler to crawl, part of the code is shown in the figure below.

640?wx_fmt=png

The crawling process is actually very simple, enter through the link on the mobile phone, then crawl in a loop, analyze it with bs, and then save it as a json file.



2 Analysis of data


After crawling the data, the next step is to analyze the data. Among the above data, there are about 5,000 pieces. (Crawl 5,000 items first. Distributed crawlers are required for high concurrency of hundreds of thousands of items)

640?wx_fmt=png


The editor crawled to the commenter's gender (0 is unknown, 1 is male, 2 is female), rating, city, rating, and comment.

640?wx_fmt=png



3 Film Critic Analysis


There are many tools for visual analysis with Python. At present, the relatively lightweight and easy-to-use library is pyecharts. Its usage has been explained many times in the official account, so I won’t repeat it in detail here! Let's take a quick look at the data visualization results of nearly 5,000 movie reviews:


1) Overall Rating

The overall score of "Nezha" in Maoyan is 9.7 points, which is undoubtedly very high. It surpassed domestic animations such as "The Legend of the White Snake". Judging from the rating distribution, most of the ratings were given full marks, accounting for 86.5% of the total, followed by 4.5 points, accounting for 7.7% of the total. Very few people gave 3 points or less, less than 5% of the total number of people. We must know that it is difficult to adjust, and the proportion of negative reviews in movies can be considered very low.


640?wx_fmt=png



2) Gender difference

Generally speaking, this kind of "blockbuster" domestic animation is more in line with the tastes of the public. Judging from the gender distribution data of the reviewers, although nearly half of the people do not want to disclose their gender, judging from the known data, the ratio of male to female audiences is about 1:1, and the ratio of female viewers is slightly higher.


640?wx_fmt=png



3). City distribution

Next, the editor analyzed the city distribution of the reviewers. The first is the histogram to roughly display the top ten popular fan cities, as shown in the figure below:

640?wx_fmt=png

The display of the histogram is not very intuitive and comprehensive. Therefore, the editor adopts the form of a map to display it more intuitively for everyone. Since the geographical location of the viewer’s city may not appear in the program settings, the editor only selects the top 80 cities with the most viewing cities as the dynamic display, as shown in the following figure:


640?wx_fmt=gif

(dynamic picture)


4) .Comment content

First integrate the comment content, and then use the wordcloud library to draw a word cloud map. Judging from the word cloud analysis, the full screen is full of praise words such as "good-looking", "good", and "special effects". Unlike previous movies, words such as "plot" and "story" are also particularly eye-catching.

640?wx_fmt=png


In fact, this blockbuster is considered a major production among domestic animation films. It took 5 years to make the film, with more than 60 revisions of the script and a production team of as many as 1,000 people. There are more than 1,800 shots in the movie, and more than 1,300 of them are special effects . It is no wonder that such a work of heart has exploded in popularity after its release!


And the director still has a lot of places to pay tribute to Master Xing, such as the Taiyi real person, which is very similar to the bridge in the Kung Fu clip, and the funniest one is "The Self-cultivation of Immortals" .


Past hits:

Rookie learns Python data analysis | Article Summary Part 1

Worth collecting|Rookie learning Python

A rookie writes a Python program, how to change from a novice to a veteran


Learning group:

Two practical projects that are very popular in the small dense circle

Fun Practical Combat in Small Closed Circles-WeChat Theme

I haven't started Python in 3 months, watch the masterpieces of these 100 students who learn Python in 3 weeks


Game category:

With 20,000 downloads, write a pinball game 2.0 in Python

Ingenious Python data structure gameplay|Practice Texas Hold'em


Guess you like

Origin blog.csdn.net/cainiao_python/article/details/98139777