摘要: import urllib.request def load_baidu(): url= "http://www.baidu.com" #添加请求头的信息 #创建请求对象 request = urllib.request.Request(url) #请求网络数据 response = urllib. 阅读全文
posted @ 2020-07-09 08:02 juham 阅读(129) 评论(0) 推荐(1) 编辑
摘要: import urllib.request def load_baidu(): url= "https://www.baidu.com" header = { #浏览器的版本 "User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) 阅读全文
posted @ 2020-07-09 08:00 juham 阅读(155) 评论(0) 推荐(0) 编辑
摘要: import urllib.request import urllib.parse import string def get_params(): url = "http://www.baidu.com/s?" params = { "wd":"中文", "key":"zhang", "value" 阅读全文
posted @ 2020-07-09 07:59 juham 阅读(133) 评论(0) 推荐(0) 编辑
摘要: import urllib.request def auth_nei_wang(): #1.用户名密码 user = "admin" pwd = "adimin123" nei_url = "http://192.168.179.66" #2.创建密码管理器 pwd_manager = urllib 阅读全文
posted @ 2020-07-09 07:33 juham 阅读(205) 评论(0) 推荐(0) 编辑
摘要: import urllib.request #付费的代理发送 #1.用户名密码(带着) #通过验证的处理器来发送 def money_proxy_use(): # #第一种方式付费代理发送请求 # #1.代理ip # money_proxy ={"http":"username:pwd@192.16 阅读全文
posted @ 2020-07-09 07:24 juham 阅读(117) 评论(0) 推荐(0) 编辑
摘要: import urllib.requestimport urllib.parseimport string def get_method_params(): url = "http://www.baidu.com/s?wd=" #拼接字符串(汉字) #python可以接受的数据 #https://w 阅读全文
posted @ 2020-07-09 07:22 juham 阅读(217) 评论(0) 推荐(0) 编辑
摘要: import urllib.request def load_data(): url = "http://www.baidu.com/" #get的请求 #http请求 #response:http相应的对象 response = urllib.request.urlopen(url) print( 阅读全文
posted @ 2020-07-09 07:18 juham 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1.http:(1)当⽤户在地址输⼊了⽹址 发送⽹络请求的过程是什么 (2)http的请求⽅式 get请求 (1)⽐较便捷 缺点:不安全:明⽂ 参数的⻓度有限制 post请求 (1)⽐较安全 (2)数据整体没有限制 (3)上传⽂件 put(不完全的) delete(删除 ⼀ 些信息) head(请求 阅读全文
posted @ 2020-07-09 07:15 juham 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 通用元素选择器 id选择器: class选择器: 组合选择器: div p{} 第一种:div元素后代的p元素 div下的p标签进行操作 匹配outer元素下的子元素c1 而下一级的即不同级的元素不算,即大于号后面就是儿子这一代的元素 阅读全文
posted @ 2020-07-03 09:54 juham 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-07-02 10:04 juham 阅读(187) 评论(0) 推荐(0) 编辑