From 04e2394f119ae7732fb07653fa2ea90c6fb0e893 Mon Sep 17 00:00:00 2001 From: monosans Date: Thu, 5 Jan 2023 20:24:01 +0300 Subject: [PATCH] Edit docstring & comment --- config.ini | 2 +- proxy_scraper_checker/proxy_scraper_checker.py | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/config.ini b/config.ini index 543c21b..0296efc 100644 --- a/config.ini +++ b/config.ini @@ -7,7 +7,7 @@ Timeout = 5 ; Maximum concurrent connections. ; Windows supports maximum of 512. ; On *nix operating systems, this restriction is much looser. -; The limit on *nix can be seen with the command ulimit -Hn. +; The limit on *nix can be seen with the command `ulimit -Hn`. MaxConnections = 512 ; Set to no to sort proxies alphabetically. diff --git a/proxy_scraper_checker/proxy_scraper_checker.py b/proxy_scraper_checker/proxy_scraper_checker.py index 083eb94..8dc0023 100644 --- a/proxy_scraper_checker/proxy_scraper_checker.py +++ b/proxy_scraper_checker/proxy_scraper_checker.py @@ -99,11 +99,13 @@ class ProxyScraperChecker: """HTTP, SOCKS4, SOCKS5 proxies scraper and checker. Args: - timeout: How many seconds to wait for the connection. The - higher the number, the longer the check will take and - the more proxies you get. - max_connections: Maximum concurrent connections. Don't set - higher than 900, please. + timeout: How many seconds to wait for the proxy to make a + connection. The higher the number, the longer the check will + take and the more proxies you get. + max_connections: Maximum concurrent connections. + Windows supports maximum of 512. + On *nix operating systems, this restriction is much looser. + The limit on *nix can be seen with the command ulimit -Hn. sort_by_speed: Set to False to sort proxies alphabetically. save_path: Path to the folder where the proxy folders will be saved. Leave empty to save the proxies to the current @@ -176,8 +178,8 @@ class ProxyScraperChecker: socks4 = cfg["SOCKS4"] socks5 = cfg["SOCKS5"] return cls( - timeout=general.getfloat("Timeout", 10), - max_connections=general.getint("MaxConnections", 900), + timeout=general.getfloat("Timeout", 5), + max_connections=general.getint("MaxConnections", 512), sort_by_speed=general.getboolean("SortBySpeed", True), save_path=general.get("SavePath", ""), proxies=folders.getboolean("proxies", True),