网页爬取 import requests import bs4 #导库 a=input("请输入请求网页:") url=a res=requests.get(url) #爬取 res.encoding="UTF-8" soup=bs4.BeautifulSoup(res.text,"lxml") print(res.text) #输出 注:在下是新手,如有错误请指出。谢谢!