python3 用requests.get获取网页内容为空 <Response [200]>

时间:2021-06-02 16:41:36   收藏:0   阅读:0


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)

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!