我正在使用selenium webdiver的方式爬取网页,代码如下,但是无法获取到如上图所示@font-face中的内容。
from selenium import webdriver
url = 'https://jn.58.com/pinpaigongyu/44466026460292x.shtml?adtype=1&from=3-list-9&slotid=1000856&productid=10043&tid=5a5efb29-2da9-428d-9519-991a2feffa7d&extParam=%7B%22ppgy_stats%22%3A%7B%22pageSource%22%3A%22%22%2C%22resource%22%3A%2258%22%2C%22abVersion%22%3A%22%22%2C%22launchid%22%3A%22%22%7D%7D&bizresource=0'
driver = webdriver.Firefox()
driver.get(url)
font_face_scripts = driver.find_element_by_xpath('/html/head/style[1]').text
print(font_face_scripts)
请问该用什么方法获取到这一内容?谢谢!