Parse is runnable now.
This commit is contained in:
parent
e10ac12d04
commit
f9799c30d8
@ -8,20 +8,18 @@ class WikipediaParser(Parser):
|
||||
website = "http://en.wikipedia.org/wiki/*"
|
||||
__spider = None
|
||||
|
||||
print "test1"
|
||||
#def __init__(self, csid):
|
||||
# self.website = "http://en.wikipedia.org/wiki/{id}".format(id=csid)
|
||||
|
||||
def parse(self, response):
|
||||
print "test1"
|
||||
print response.url
|
||||
#self.log('A response from %s just arrived!' % response.url)
|
||||
#def parse():
|
||||
sel = Selector("http://en.wikipedia.org/wiki/Methane")
|
||||
sel = Selector(response)
|
||||
items = []
|
||||
item = Result()
|
||||
item['attribute']="Melting point"
|
||||
item['value']=site.xpath('//tr[contains(@href, "/wiki/Melting_point")]/text()').extract()
|
||||
item['source']= self.website
|
||||
item['value']="value1" # sel.xpath('//tr[contains(@href, "/wiki/Melting_point")]/text()').extract()
|
||||
item['source']= "Wikipedia"
|
||||
items.append(item)
|
||||
print item['attribute']
|
||||
print item['value']
|
||||
|
Reference in New Issue
Block a user