1 import requests 2 3 def test_requests(): 4 headers = { 5 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 6 'Accept-Encoding': 'gzip, deflate, sdch', 7 'Referer': 'http://jandan.net/ooxx', 8 'Referer': 'http://jandan.net/ooxx', 9 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36', 10 'Cookie': 'cfduid=d0f8f8aef303ad3b55cd071a426e7a59c1504854664;ga=GA1.2.986719823.1501079288;gid=GA1.2.1585289570.1506061387' 11 } 12 respones = requests.get("http://jandan.net/ooxx/page-98#comments", headers=headers) 13 print(respones.text)
if __name__ == "__main__":
test_requests()
得到的图片链接全部是//img.jandan.net/img/blank.gif这个,请问各位大佬,这是什么原因啊
onload="jandan_load_img(this)
js加载过来的,
麻烦问一下,什么意思啊,没看明白,我应该怎么改代码呢,大佬?
@小小的程序员DBJ:你可以模拟登陆获取,selenium + chrome.我博客有例子你可以改改用