Archived
1
0

Code inspection

This commit is contained in:
Jip J. Dekker 2014-06-20 11:21:26 +02:00
parent 87275a6dc8
commit 22ca4afa33
4 changed files with 31 additions and 28 deletions

View File

@ -313,7 +313,8 @@ class NIST(Source):
:param conditions: optional conditions regarding the value
:return: A Result item
"""
return Result({
return Result(
{
'attribute': attribute,
'value': value,
'source': 'NIST',

View File

@ -58,10 +58,12 @@ class PubChem(Source):
# the seperate html page which contains the properties and their values
# using this cid to get the right url and scrape it
requests.append(Request(url=self.website_pubchem[:-2].replace("\\","") + self.data_url % cid, callback=self.parse_data))
requests.append(
Request(url=self.website_pubchem[:-2].replace("\\", "") + self.data_url % cid, callback=self.parse_data))
return requests
def parse_data(self, response):
@staticmethod
def parse_data(response):
"""
Parse data found in 'Chemical and Physical properties' part of a substance page.
:param response: The response with the page to parse