How to Use Python to get your favorite top n movie information in Douban, pythontop
1. What is Python?
Python is a simple, easy to learn, elegant, robust, powerful, and object-oriented interpreted scripting language. with over 20 years of development history, mature and stable. rich and powerful class libraries support daily applications.
In 1989, romsam wanted to develop a set of tools to complete daily system management tasks and access the distributed operating system Amoeba system calling. So he began to create a universal development Language Python from the end of 1989.
Ii. Why Python?
All languages have application scenarios, only suitable and inappropriate
Language is a tool, and ideas (Ideas & algorithms) are the foundation
Iii. Advantages of Python
Easy to learn
Simple, easy to learn, free, open-source, portable, scalable, embedded, and object-oriented
Well-functioning development that can meet the vast majority of our work needs
Common Language, which can be used in almost any field or scenario and can be used across platforms. Currently, the Python runtime environment is installed by default in all Linux systems.
Whether there is a complete ecosystem in the community
Pypi, github, StackOverFlow, oschina
Success stories
Domestic: Douban, zhihu, Shanda, BAT, Sina, Netease...
Foreign Countries: Google, YouTube, Facebook, RedHat...
Iv. Use Cases of Python
System Management Tasks
Web Programming
Graphics Processing and multimedia applications
Text Processing (crawler)
Mathematical processing (data analysis and machine learning)
Network Programming
Game Development
Hacker (POC script, Trojan)
Automated Testing
O & M Development
Cloud computing
5. What is crawler?
Automatically obtain information on the internet according to certain rules (with the rapid development of the network, the Internet has become a carrier of a large amount of information, and how to effectively extract and use this information has become a huge challenge)
Application
Search engines (Google, Baidu, Bing, and other search engines to help people Retrieve Information)
Stock software (crawling stock data to help people analyze decisions and conduct financial transactions)
Web scanning (all Web pages of the website need to be scanned for vulnerabilities)
Get the latest articles from a website
Crawl Weather Forecast
Crawl beautiful mm photos
Likes a space friend
......
Vi. Practical projects
1. Project Objectives
Objective: To obtain information about your favorite top n movies in Douban
2,Basic knowledge
HTTP protocol
The client initiates a request. After receiving the request, the server returns formatted data. The client receives, parses, and processes the data.
HTML (Hypertext Markup Language)
Python
Basic syntax
Module
>>> Common system modules
>>> Third-party module Installation and Use
>>> Pip install requests
>>> Pip install pyquery
3. manual search
4. Program startup
5. Get the movie list
6. Get movie details
7. Write csv files
How to Learn Python
Multi-copy, multi-write, think much, ask more, read more, listen more, say more
Learning programming is used to solve practical problems and program repetitive work in work or study.
Google and Du Niang
Join the Python learning and Communication Group (read more, share more, and communicate more)
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.