Scrapy Returning A Null Output When Extracting An Element From A Table Using Xpath
I have been trying to scrape this website that has details of oil wells in Colorado https://cogcc.state.co.us/cogis/FacilityDetail.asp?facid=12307555&type=WELL Scrapy scrapes t
Solution 1:
Seems like its an xpath problem, in this site during the development they might have omitted tbody
but a browser automatically inserted when its viewed through the browser. You can get more info about this from here.
So you need county's value (WELD #123
) in the given page then the possible xpath
will be,
In [20]: response.xpath('/html/body/font/table/tr[6]/td[2]//text()').extract()
Out[20]: [u'WELD #123']
Post a Comment for "Scrapy Returning A Null Output When Extracting An Element From A Table Using Xpath"