Код: Выделить всё
self.config = configparser.ConfigParser()
self.config.read(config_file)
self.status_codes = [int(code) for code in self.config.get("settings", "status_codes").split(',')]
Код: Выделить всё
def make_request(self, url, results):
try:
print(f"\r\033[K[{self.name}] trying {url}", end="\r")
response = requests.get(url, timeout=self.timeout)
if response.status_code in self.status_codes:
with self.lock:
results.append((get_time(), url, response.status_code))
print(f"[{response.status_code}] {url}")
except requests.exceptions.Timeout:
...
Как мне решить эту проблему?
Подробнее здесь: https://stackoverflow.com/questions/790 ... rser-issue