摘要: get请求豆瓣电影 下载 import urllib.parse import urllib.request import json # url = 'https://movie.douban.com/j/chart/top_list?type=19&interval_id=100%3A90&act 阅读全文
posted @ 2024-07-10 23:47 donghongchao 阅读(2) 评论(0) 推荐(0) 编辑
摘要: # #post请求百度之详细翻译 # import urllib.request # import urllib.parse # url = 'https://fanyi.baidu.com/sug' # data = { # 'kw': "spide" # } # print(data) # da 阅读全文
posted @ 2024-07-10 18:16 donghongchao 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 请求对象的定制 import urllib.request url=("https://www.baidu.com") heards = { 'user-agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (K 阅读全文
posted @ 2024-07-10 15:50 donghongchao 阅读(2) 评论(0) 推荐(0) 编辑
摘要: url = 'http://www.baidu.com' #模拟浏览器向服务器发送请求 response = urllib.request.urlopen(url) # res = response.read().decode('utf-8') #print(res) #一个类型,六个方法 # pr 阅读全文
posted @ 2024-07-10 10:51 donghongchao 阅读(3) 评论(0) 推荐(0) 编辑