python之爬虫

import requests
from bs4 import BeautifulSoup
response = requests.get("https://www.cnblogs.com/wangyinghao/p/10712328.html");
response.encoding="UTF-8"
doc = BeautifulSoup(response.text,"html.parser")
print(doc.find(id='id2'))
posted @ 2019-11-08 17:50  甘雨淋莉  阅读(103)  评论(0编辑  收藏  举报