minor edits (comments etc.)
This commit is contained in:
parent
34c3a8b4d6
commit
74aa446f40
@ -33,13 +33,12 @@ class WikipediaParser(Parser):
|
|||||||
item['value'] = prop_values[i].extract().encode('utf-8')
|
item['value'] = prop_values[i].extract().encode('utf-8')
|
||||||
item['source'] = "Wikipedia"
|
item['source'] = "Wikipedia"
|
||||||
items.append(item)
|
items.append(item)
|
||||||
#print "new: " + item['attribute']
|
print "new: " + item['attribute']
|
||||||
#print item['value']
|
print item['value']
|
||||||
items=filter(lambda a: a['value']!='', items)
|
items=filter(lambda a: a['value']!='', items) #remove items with an empty value
|
||||||
print items
|
print items
|
||||||
return items
|
return items
|
||||||
|
|
||||||
|
|
||||||
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] + compound, callback=self.parse)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user