created newresult function that uses the config for reliability
This commit is contained in:
parent
217fb3e9cd
commit
755c981efa
@ -210,6 +210,15 @@ class ChemSpider(Source):
|
|||||||
properties.append(result)
|
properties.append(result)
|
||||||
return properties
|
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):
|
def parse_searchrequest(self, response):
|
||||||
"""Parse the initial response of the ChemSpider Search API """
|
"""Parse the initial response of the ChemSpider Search API """
|
||||||
sel = Selector(response)
|
sel = Selector(response)
|
||||||
|
Reference in New Issue
Block a user