Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit 989a089

Browse files
committed
fixed some issue for lower versions
1 parent 7f33158 commit 989a089

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/proxy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
### Importing
55
from src import sendRequest
6+
from typing import Union
67

78

89
### Constant
@@ -14,7 +15,7 @@ class Proxy:
1415

1516
def __init__(
1617
self,
17-
proxy_filename : str | None = None,
18+
proxy_filename : Union[str, None] = None,
1819
proxyEnable : bool = False
1920
):
2021
self.proxy_api_url = "https://api.proxyscrape.com/v2/?request=displayproxies&protocol=http&timeout=10000&country=all&ssl=all&anonymity=all"

src/sendRequest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def __openConnection(self):
113113
}
114114

115115
try:
116-
res = request.urlopen(self.__req, timeout = 20)
116+
res = request.urlopen(self.__req, timeout = 5)
117117

118118
except error.HTTPError as e:
119119
errorLog["error"] = e

0 commit comments

Comments
 (0)