Exemplo n.º 1
0
    def item_found(self, response):
        found_resource = response.url 
        LOGGER.log(CUSTOM_LOGGING.RES_FOUND, found_resource)
        
        item = Result()
        item['url'] = found_resource

        # STORE THE RESULTS         
        # Opening the file...
        target = open(self.sessionFilename, 'a+')
        target.write(found_resource)
        target.write("\n")
        
        # ... and close
        target.close()
        
        return item
Exemplo n.º 2
0
    def item_found(self, response):
        found_resource = response.url
        LOGGER.log(CUSTOM_LOGGING.RES_FOUND, found_resource)

        item = Result()
        item['url'] = found_resource

        # STORE THE RESULTS
        # Opening the file...
        target = open(self.sessionFilename, 'a+')
        target.write(found_resource)
        target.write("\n")

        # ... and close
        target.close()

        return item