new_compound_request now returns a Request with a searh URL
This commit is contained in:
parent
e1e507f745
commit
0cec4bd2d8
@ -8,6 +8,8 @@ from FourmiCrawler.items import Result
|
|||||||
class NIST(Source):
|
class NIST(Source):
|
||||||
website = "http://webbook.nist.gov/*"
|
website = "http://webbook.nist.gov/*"
|
||||||
|
|
||||||
|
search = 'cgi/cbook.cgi?Name=%s&Units=SI&cTG=on&cTC=on&cTP=on'
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
Source.__init__(self)
|
Source.__init__(self)
|
||||||
|
|
||||||
@ -15,5 +17,5 @@ class NIST(Source):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
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] + self.search % compound,
|
||||||
pass
|
callback=self.parse)
|
||||||
|
Reference in New Issue
Block a user