以下代码实现于jupyter notebook
import requests
import lxml.html
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36'}
def get_url(http_url):
#爬取整个网页内容
r = requests.get