From 6df33e014342895fc7c84503e63df729ff20b039 Mon Sep 17 00:00:00 2001 From: monosans Date: Sun, 13 Feb 2022 16:35:12 +0300 Subject: [PATCH] Print absolute path --- config.py | 2 +- main.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.py b/config.py index 0e257ae..83a9556 100644 --- a/config.py +++ b/config.py @@ -3,7 +3,7 @@ # How many seconds to wait for the proxy to make a connection. # The higher this number, the longer the check will take # and the more proxies you will receive. -TIMEOUT = 5 +TIMEOUT = 2 # Maximum concurrent connections. # Don't set higher than 900, please. diff --git a/main.py b/main.py index b7054c6..060c803 100755 --- a/main.py +++ b/main.py @@ -101,7 +101,7 @@ class ProxyScraperChecker: save_path: Path to the folder where the proxy folders will be saved. """ - path = Path(save_path) + self.path = Path(save_path) folders = ( ("proxies", proxies), ("proxies_anonymous", proxies_anonymous), @@ -109,7 +109,7 @@ class ProxyScraperChecker: ("proxies_geolocation_anonymous", proxies_geolocation_anonymous), ) self.folders = [ - Folder(folder, path) for folder, enabled in folders if enabled + Folder(folder, self.path) for folder, enabled in folders if enabled ] if not self.folders: raise ValueError("all folders are disabled in the config") @@ -279,8 +279,8 @@ class ProxyScraperChecker: self.save_proxies() self.c.print( "[green]Proxy folders have been created in the " - + (f"{self.path} folder" if self.path else "current directory") - + ".\nThank you for using proxy-scraper-checker :)" + + f"{self.path.absolute()} folder." + + "\nThank you for using proxy-scraper-checker :)" ) @property