Archived
1
0

added comments for chemspider parse_extendedinfo

This commit is contained in:
RTB 2014-04-18 17:14:19 +02:00
parent 2ac6d1711d
commit 3c5dbc44dc

View File

@ -170,6 +170,7 @@ somewhere.
return synonym return synonym
def parse_extendedinfo(self, response): def parse_extendedinfo(self, response):
"""Scrape data from the ChemSpider GetExtendedCompoundInfo API"""
sel = Selector(response) sel = Selector(response)
properties = [] properties = []
names = sel.xpath('*').xpath('name()').extract() names = sel.xpath('*').xpath('name()').extract()
@ -177,7 +178,7 @@ somewhere.
for (name, value) in zip(names,values): for (name, value) in zip(names,values):
result = Result({ result = Result({
'attribute': name, 'attribute': name,
'value': value, 'value': value, #These values have no unit!
'source': 'ChemSpider ExtendedCompoundInfo', 'source': 'ChemSpider ExtendedCompoundInfo',
'reliability': 'Unknown', 'reliability': 'Unknown',
'conditions': '' 'conditions': ''