用python爬取网页图片,想要得到jpg的连接,然而爬到的网页没有该内容,代码如下:
import urllib.request
import requests
import bs4
Url=str("http://tw.ikanman.com/comic/8928/87948.html#p=8")
html=requests.get(Url)
html.encoding='utf-8'
html=html.text
soup=bs4.BeautifulSoup(html,'lxml')
print (soup)
This webpage does not use ajax. It also encrypts the js code, which can be decrypted, but it is not very convenient. It is recommended to use selenium+browser to operate, and search for tutorials by yourself, which are also available on this site.
Request header information:
Return header information:
In fact, it is a 302 jump, please check the relevant information yourself