Archived
1
0

created newresult function that uses the config for reliability

This commit is contained in:
RTB 2014-06-06 18:12:31 +02:00
parent 217fb3e9cd
commit 755c981efa

View File

@ -210,6 +210,15 @@ class ChemSpider(Source):
properties.append(result)
return properties
def newresult(self, attribute, value, conditions, source='ChemSpider'):
return Result({
'attribute': attribute,
'value': value,
'source': source,
'reliability': self.cfg['reliability'],
'conditions': conditions
})
def parse_searchrequest(self, response):
"""Parse the initial response of the ChemSpider Search API """
sel = Selector(response)