def extractLinksfromResponse(self, url, links): """analyses the incoming links from the response """ for link in links: key = md5(link).hexdigest() if key in self.db.iterkeys(): doc = self.db[key] doc.insertIL(url) else: newDo = Document(link) newDo.insertIL(url) #print type(newDo) #print type(key) self.db[key] = newDo
def extractLinksfromResponse(self, url, links): """analyses the incoming links from the response """ for link in links: key = md5(link).hexdigest() if key in self.db.iterkeys(): doc = self.db[key] doc.insertIL(url) else: newDo = Document(link) newDo.insertIL(url) # print type(newDo) # print type(key) self.db[key] = newDo