Fix errors on Python 3.7/3.8

Fixes #40
This commit is contained in:
monosans
2023-02-21 21:22:47 +03:00
parent eab87c5287
commit 8f9569edd9
2 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ You can get proxies obtained using this script in [monosans/proxy-list](https://
- Download and unpack [the archive with the program](https://github.com/monosans/proxy-scraper-checker/archive/refs/heads/main.zip).
- Edit `config.ini` according to your preference.
- Install [Python](https://python.org/downloads) (Windows 7 requires Python 3.8.X). During installation, be sure to check the box `Add Python to PATH`.
- Install [Python](https://python.org/downloads) (minimum supported version is 3.7). During installation, be sure to check the box `Add Python to PATH`.
- Install dependencies and run the script. There are 2 ways to do this:
- Automatic:
- On Windows run `start.cmd`
+4 -5
View File
@@ -50,17 +50,16 @@ def get_config(file: str) -> ConfigParser:
return cfg
def main() -> None:
set_event_loop_policy()
async def main() -> None:
cfg = get_config("config.ini")
console = Console()
configure_logging(console, debug=cfg["General"].getboolean("Debug", False))
psc = ProxyScraperChecker.from_configparser(cfg, console=console)
asyncio.run(psc.run())
await psc.run()
if __name__ == "__main__":
main()
set_event_loop_policy()
asyncio.run(main())