![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
from selenium import webdriver import time import codecs from scrapy.selector import Selector # webdriver=webdriver.Firefox() # webdriver.get(r"C:\Users\gaoxiang\Desktop\1\asfd.html") with open("asfd.txt",'r',encoding="utf8") as c: # a=webdriver.page_source # # c.write(a.encode("utf-8")) # print(a) a=Selector(text=c.read()) print(a.xpath('//*[@id="J_isku"]/div/dl[1]/dt'))