报废时,我同时使用xpath和css获得空输出

时间:2019-11-29 10:18:22

标签: python web-scraping

class Finaldata(scrapy.Spider):
name = 'final_spider'
start_urls = ["https://www.1mg.com/drugs/celetop-200mg-capsule-309137"]

//website to scrape
def parse(self, response):
    items = FinallinksItem()

//xpath used   
product_name = response.xpath('//*@id="drug_header"]/div/div/div[2]/div[1]/h1').extract()

对此没有任何输出。

0 个答案:

没有答案