Added extra request for chemspider link retreived from Wikipedia
This commit is contained in:
parent
f926f86d7d
commit
b5c83125f7
@ -46,7 +46,10 @@ class WikipediaParser(Parser):
|
|||||||
items.append(item)
|
items.append(item)
|
||||||
log.msg('Wiki prop: |%s| |%s| |%s|' % (item['attribute'], item['value'], item['source']), level=log.DEBUG)
|
log.msg('Wiki prop: |%s| |%s| |%s|' % (item['attribute'], item['value'], item['source']), level=log.DEBUG)
|
||||||
items=filter(lambda a: a['value']!='', items) #remove items with an empty value
|
items=filter(lambda a: a['value']!='', items) #remove items with an empty value
|
||||||
return self.cleanitems(items)
|
itemlist=self.cleanitems(items)
|
||||||
|
request=Request(self.getchemspider(sel))
|
||||||
|
itemlist.append(request)
|
||||||
|
return itemlist
|
||||||
|
|
||||||
def new_compound_request(self, compound):
|
def new_compound_request(self, compound):
|
||||||
return Request(url=self.website[:-1] + compound, callback=self.parse)
|
return Request(url=self.website[:-1] + compound, callback=self.parse)
|
||||||
|
Reference in New Issue
Block a user