04 2023 档案
python3解析库(Beautiful Soup、pyquery、parsel)
摘要:
Beautiful Soup 基本使用 <html> <head> <title> The Document's story </title> </head> <body> <p class="title" name="dromouse"><b>The Dormouse's story</b></p

正则表达式和XPath
摘要:正则表达式 常用匹配规则 模式 描述 \w 匹配字母、数字以及下划线 \W 匹配不是字母、数字及下划线的字符 \s 匹配任意空白字符串,等价于[\t\n\r\f] \S 匹配任意非空字符串 \d 匹配任意数字,等价与[0-9] \D 匹配任意非数字的字符 \A 匹配字符串的开头 \Z 匹配字符串结尾
Python3基本请求库-requests
摘要:
#requests 基本请求 import requests r=request.get('https://www.baidu.com/') print(type(r)) print(r.status_code) print(r.cookies) #get post put delete patch

Python3基本请求库-urllib
摘要:
urllib urlopen 一个基本请求 from urllib import request, parse def Api(): # 禁用证书验证 ssl._create_default_https_context = ssl._create_unverified_context respons
