def run(self):
     try:
         filesize = spider.addLinkSpider(self.add_link_dictionary)
         self.ADDLINKSPIDERSIGNAL.emit(filesize)
     except Exception as e:
         print(str(e))
         print("Spider couldn't find download information")
         logger.sendToLog("Spider couldn't find download information",
                          "ERROR")
Beispiel #2
0
 def run(self):
     try :
         filesize = spider.addLinkSpider(self.add_link_dictionary)
         if filesize:
             self.ADDLINKSPIDERSIGNAL.emit(filesize)
         else:
             logger.sendToLog(
                 "Spider couldn't find download information", "ERROR")
     except Exception as e:
         logger.sendToLog(
             "Spider couldn't find download information", "ERROR")
         logger.sendToLog(
             str(e), "ERROR")
Beispiel #3
0
    def run(self):
        try:
            # get file name and file size
            file_name, file_size = spider.addLinkSpider(
                self.add_link_dictionary)

            spider_dict = {'file_size': file_size, 'file_name': file_name}

            # emit results
            self.ADDLINKSPIDERSIGNAL.emit(spider_dict)

            # write an ERROR in log, If spider couldn't find file_name or file_size.
            if not (file_name):
                logger.sendToLog("Spider couldn't find file name", "ERROR")
            if not (file_size):
                logger.sendToLog("Spider couldn't find file size", "ERROR")
        except Exception as e:
            logger.sendToLog("Spider couldn't find download information",
                             "ERROR")
            logger.sendToLog(str(e), "ERROR")