摘要:
import requests import json def xiaodai(): baseurl = 'https://fanyi.baidu.com/sug' # 定义我要请求的url con = input("请输入你要翻译的内容:") # 定义我要翻译的内容 data = { 'kw': 阅读全文
posted @ 2020-06-11 16:05
阿久丶xin
阅读(581)
评论(0)
推荐(0)
摘要:
Python3 parse模块 思路: 访问百度搜索关键字(大熊猫) 浏览器编码需要用到url编码,用到parse包,parse接收值为字典 将url与关键字编码后结合起来发起get请求 import requests from urllib import parse def xiaodai(): 阅读全文
posted @ 2020-06-11 13:47
阿久丶xin
阅读(1607)
评论(0)
推荐(0)
摘要:
python requests模块 import requests def test(): url = 'http://erge1998.cn' # 发起get请求,并且返回结果 # 将请求到的内容赋值给rsp rsp = requests.get(url) # 此时的rsp属于一个类,是一个res 阅读全文
posted @ 2020-06-11 11:26
阿久丶xin
阅读(148)
评论(0)
推荐(0)

浙公网安备 33010602011771号