ReviewLast Lesson review: 1, c/s client----- Server Browser-----Server which must have: 1, stable operation , has been providing services to the outside 2, binding a fixed ip+port 2, the
After the environment is set up, let's look at some simple uses of requests, including:
Requests commonly used request methods, including: Get,post
Use of session and cookie in requests library
Other advanced sections:
Since 2017来, contact Python actually is quite a long time, the most bitter time is just the beginning of time, really, I feel that programming is a feeling, and sometimes like looking for objects, feel right, how to learn is the fun hahaha. In this
Crawl Autohome News, the code is as followsImportRequestsres=requests.get (url='https://www.autohome.com.cn/news/')#initiate a GET request directly to the car to obtain the requested dataRes.encoding=res.apparent_encoding#The encoding of HTML to the
Tag: Split expression specifies regular log pos space out character1.strip (): Remove the blanks from the head and tail2.lstrip (): Remove the left space3.rstrip (): Remove the space on the right4.replace (' C1 ', ' C2 '): Replace the C1 in the
A variable definition in PythonSimilar to Java1, composed of alphanumeric underline2, the first letter can not be a number3. No keywordsSecond, constantAll consist of uppercase letters, do not change it, can actually changeThird, commentsSingle-line
python Environment:To install Python: Pyrhon installed on the OS, To perform the operation: write a file, the file in accordance with the rules of Python, the file to the Python software, read the contents of the file, then convert and execute, and
class Person (object): Count = 0 #类属性 def __init__ (self,name,age): #实例属性 # Self.__name = Name#name is a private property; The private property receive is the Set/get method; # self.__name can also be used with Self.setname (name)
Original addressOriginal Address 2Several implementations of the singleton pattern in Python and its optimizationReading directory (content)Single-Case modeSeveral ways to implement a singleton pattern1. Using the module2. Using adorners3. Using the
NO1:"Pillow" Image processing Standard libraryScaling fromPILImportImage#open a JPG image file, note the current path:im = Image.open ('test.jpg')#Get image size:W, h =im.sizePrint('Original image size:%sx%s'%(W, h))#Zoom to 50%:Im.thumbnail (W//2,
a prefaceThe core idea of Web UI Automation is to find elements, and then manipulate the two elements. In the Python Selenium series (ii) Element positioning method article, which describes how to find an element, this article describes the second
Python is omnipotent, learning Python, a summer vacation is enough!!Getting started with Python, the best way to play from a hacker is the simplest!!Recommend a book today "11 Tricks to play network security-with Python, more secure"
Network
02_python Foundation _day04
The basic format of the while loopInitializing countersWhile condition:Code that satisfies the criteria to be executed repeatedly......modifying counters
Understand the effect of break and continue two keywords,
03_ Object-oriented _day01
An object-oriented abbreviation?Object-oriented programming--object oriented programming shorthand OOP, is a programming idea or method
Object-oriented and process-oriented differences?Process-oriented is an early
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service