Before we learn a language, we must first understand it. Therefore, many friends may have a question when they first come into contact with python, what can python do? At the same time, we often see the word python crawler. So, what is a python crawler? This article PHP Chinese website will introduce to you what python can do and the concept of python crawler.
Python is a fairly high-level language with rich and powerful libraries. Various modules made in other languages (especially C/C) can be easily connected together. For example, the graphics rendering module in 3D games has particularly high performance requirements, so it can be rewritten in C/C and then encapsulated into an extended class library that can be called by Python. It should be noted that you may need to consider platform issues when using extended class libraries, and some may not provide cross-platform implementation.
After briefly understanding python, let’s take a look at what python can do?
What can python do?
1. Web development: Server-side programming, with rich web development frameworks, such as Django and TurboGears, to quickly complete the development of a website and web services.
2. Crawler, data analysis, data mining, machine learning.
3. Scientific computing: Python is widely used in scientific and numerical computing, such as bioinformatics, physics, architecture, geographic information systems, image visualization analysis, life sciences, etc. Commonly used are numpy, SciPy, Biopython , SunPy, etc.
4. Operation and maintenance automation: automatically handle a large number of operation and maintenance tasks
5. Test automation: written as a simple implementation script, used in Selenium/lr to achieve automation.
6. Graphical interface development: Python can write desktop graphical user interfaces and can also extend Microsoft Windows. Commonly used are Tk, GTK, PyQt, win32, etc.
7. Game development: Python has a very good 3D rendering library and game development framework. There are many games developed using Python, such as Disney's Toon City and Blade of Darkness. Commonly used PyGame, Pykyra, etc. and a PyWeek competition.
Among the usage of python mentioned above, python can be used for crawling. So, let’s take a closer look at the concept of python crawling.
What is a python crawler?
The python crawler is actually a program that automatically captures Internet information and captures valuable information for us from the Internet.
To put it in more detail:
If we compare the Internet to a big spider web, the data is stored in each node of the spider web, and the crawler is a small spider;
Catch your own prey (data) along the network. A crawler refers to a program that initiates a request to a website, obtains resources, analyzes and extracts useful data.
From a technical perspective, it simulates the behavior of a browser requesting a site through a program, crawls the HTML code/JSON data/binary data (pictures, videos) returned by the site to the local, and then extracts the data you need. Store and use.
After understanding the python crawler, let’s briefly talk about what python can do
As a general search engine web page collector. (google, baidu)
Do vertical search engines.
Scientific research: online human behavior, online community evolution, human dynamics research, econometric sociology, complex networks, data mining, etc. Empirical research in the field requires a large amount of data, and web crawlers are a powerful tool for collecting relevant data.
There are other usages, etc., so I won’t go into details.
Related recommendations:
Why do people like to use python when writing crawlers?
What is a python crawler? Why is python called a crawler?
The above is the detailed content of What can python do? What is a python crawler?. For more information, please follow other related articles on the PHP Chinese website!