标签:网页 bsp nbsp safari bs4 ike header window use
import requests
from bs4 import BeautifulSoup
headers = {
‘Cookie‘:‘OCSSID=4df0bjva6j7ejussu8al3eqo03‘,
‘User-Agent‘:‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36‘
‘(KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36‘,
}
res = requests.get(url,headers = headers)
python3 用requests.get获取网页内容为空 <Response [200]>
标签:网页 bsp nbsp safari bs4 ike header window use
原文地址:https://www.cnblogs.com/Rui6/p/14826855.html