| 98 | self.conf = ConfigHandler() |
| 99 | |
| 100 | def run(self): |
| 101 | self.log.info("{}ProxyCheck - {}: start".format(self.work_type.title(), self.name)) |
| 102 | while True: |
| 103 | try: |
| 104 | proxy = self.target_queue.get(block=False) |
| 105 | except Empty: |
| 106 | self.log.info("{}ProxyCheck - {}: complete".format(self.work_type.title(), self.name)) |
| 107 | break |
| 108 | proxy = DoValidator.validator(proxy, self.work_type) |
| 109 | if self.work_type == "raw": |
| 110 | self.__ifRaw(proxy) |
| 111 | else: |
| 112 | self.__ifUse(proxy) |
| 113 | self.target_queue.task_done() |
| 114 | |
| 115 | def __ifRaw(self, proxy): |
| 116 | if proxy.last_status: |