我尝试使用urllib,请求和chromedriver解析以下Pinterest页面:
https://www.pinterest.com/pin/463237511669606028/
但是我的结果似乎缺少页面的某些部分。具体来说,我正在尝试解析重定位的次数(在注释下方),我无法。
我尝试了这两个选项,但是userActivity类不是我得到的内容的一部分:
driver.get("https://www.pinterest.com/pin/463237511669606028/")
html = driver.page_source
soup = BeautifulSoup(html, features="html.parser")
和
req = urllib2.Request("https://www.pinterest.com/pin/463237511669606028/",
headers={'User-Agent': "PyBrowser"})
con = urllib2.urlopen(req)
content = con.read()
soup = BeautifulSoup(content,features="html.parser")
有什么想法吗?