preface

Today I will introduce you to use Python to download biquge novels.

Let’s have a good time

The development tools

Python version: 3.6.4

Related modules:

Requests module;

Bs4 module;

And some modules that come with Python.

Environment set up

Install Python and add it to the environment variables. PIP installs the required related modules.

Introduction of the principle

Random point to open a pen fun pavilion novel:

Extract novel names and address information for all sections using Requests + bS4:

Then, according to the extracted address information, we can crawl the content of each chapter of the novel (pay attention to the coding, it is easy to garble) :

To help upgrade those of you who are learning Python, here is a rich learning package

All Done! Complete source code see the package diagram for related files.