摘要:
# \[案例]爬取贴吧并保存网页文件 ```python import urllib.parse import requests class TiebaSpider(object): def __init__(self, url, name): self.url = url self.name = 阅读全文
摘要:
# 基本使用 # 发送get请求、获取响应各种请求、响应信息 ```python def fun1(): url = "http://www.baidu.com" resp = requests.get(url) print(resp) # 打印时会发现乱码 # 因为resp默认是自动推算编码的,经 阅读全文