The best introduction to Python! No way to start zero-based self-study? Start with a reptile!

For the vast majority of people who want to learn Python, crawlers are definitely the best way to get a ride and start learning Python.

I chose Python to learn at that time, aiming at The Python crawler, because the crawler’s thinking mode is fixed and the programming mode is relatively simple. Generally, it can be successful if I accumulate some experience in detail processing.

Understand the Python crawler correctly

Python crawler? Why is it called a reptile? I was confused when I first heard the name.

A reptile is literally a worm crawling around, so it’s called a reptile?

To put it simply, a crawler is like a detection machine. Its basic operation is to simulate human behavior, wander around various websites, click buttons, look up data, and then bring back the information you see.

The name of a Python crawler is a bit more descriptive.

Understand the nature of reptiles

The essence of crawler is to simulate the browser to open the web page and get the part of data we want in the web page.

Open web browser process: when you enter the address in the browser, after the DNS server found server host, send a request to the server, the server parsed the coma to the user’s browser as a result, including HTML, js, CSS file content, such as the browser parses out finally presented to the user on the browser to see the results.

So the browser results that the user sees are made up of HTML code, and we crawler to get that content, by analyzing and filtering the HTML code, to get the resources that we want.

To learn a Python crawler, you need to solve the following four problems:

1. Familiar with Python programming

Familiar with Python programming, a computer programming language. Is an object-oriented, dynamically typed language, originally designed for writing automated scripts (shells), but increasingly used for independent, large project development as versions are updated and new features are added to the language.

So Python programming is computer programming in Python.

2. Understand the HTML

Look at HTML, the language used to describe web pages.

HTML stands for Hyper Text Markup Language

HTML is not a programming language, but a Markup language.

A markup language is a set of markup tags.

HTML uses tag tags to describe web pages

3. Understand the basic principles of web crawlers

The basic principle of web crawler, web crawler is an important part of search engine search system. The main purpose of crawler is to download web pages from the Internet to local form a mirror copy or network content. This blog post gives a brief overview of crawlers and crawling systems.

A general web crawler framework is shown below:

4. Learn to use the Python crawler library

Requests is an easy-to-use HTTP library for Python crawlers. Urllib requests is an easy-to-use HTTP library for Python crawlers. Find the path to Scripts in the Python installation path:

C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\Scripts

CMD: CD C: \ Users \ \ Administrator \ AppData \ Local \ designed \ Python38-32 \ \ Python Scripts

3. Be sure you’re not a Python crawler

Getting started with a Python crawler is the most important and easiest step. Be sure to get interested in a Python crawler! Interested in!

As a longtime Python crawler fan, I feel that no matter what you learn, you should be interested and persistent, and then you can really learn.

You don’t even need to learn python classes, multithreading, modules, and the like to get started with crawlers. It’s based on your abilities, based on what you want to learn, what you want to do, what you want to do, and even what you want to do to become a Python reptilian god at a later stage.

It is recommended that you do not start by yourself on the Internet, because there are many Python crawler tutorials on the Internet, but there are not many that are truly oriented to Python based on zero basis. If you find really useful quality learning materials, with the guidance of professional teachers, you can not only learn Python crawlers, but also learn other Python related content, and master more content. Job prospects are also better.

To learn Python crawlers, you must repeatedly chewing syntax logic, such as lists, dictionaries, strings, if statements, for loops, and other core things must be learned by heart and hand.

Finally, I wish you all the best in your Python crawler journey, and I wish you all the best.