preface

When I sent Python to crawl and analyze the recruitment data of Lagou.com, it seemed that someone asked me to crawl the recruitment data of other places. So today I will crawl the recruitment data of 51job for you

The development tools

Python version: 3.6.4
Related modules:

Requests module;

Pyecharts module;

And some of the modules that come with Python.

Environment set up

Install Python and add it to the environment variable, and the PIP will install the appropriate module.

Data crawl

(1) Ideas

The target data we are going to climb are these:

The format of the link to get the data is:

https://search.51job.com/list… {job information keywords},2,{page number}.html

Request the above link and then use XPath to extract the recruitment data we need. The code is as follows:

(Note: Keywords I use Python, so you can change the keywords to suit your needs.)

(2) Operation mode

Run the file “51job.py” in a CMD window.

Run the screenshot:

The data is stored in “data.pkl”.

The data analysis

(1) Operation mode

Run the file “analysis.py” in a CMD window.

(2) Simple analysis

First, of course, we need to look at salaries:

Then take a look at the demand for jobs in parts of the country:

Let’s take a look at some Python related jobs:

To help those who are learning Python, there is a rich learning kit here

See Personal Profile for complete source code to obtain related files ~