Archived
1
0

get value not list from xpath

This commit is contained in:
Bas Vb 2014-04-16 13:23:50 +02:00
parent d99548e3b6
commit f1280dd66d

View File

@ -75,6 +75,6 @@ class WikipediaParser(Parser):
return item
def getchemspider(self, sel):
link=sel.xpath('//tr/td/a[@title="ChemSpider"]/../../td[2]/span/a/@href').extract() # ('//tr[contains(@href, "/wiki/Melting_point")]/text()').extract()
link=sel.xpath('//tr/td/a[@title="ChemSpider"]/../../td[2]/span/a/@href').extract()[0] # ('//tr[contains(@href, "/wiki/Melting_point")]/text()').extract()
print link
return link