You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mbbank/main.py
+17-11Lines changed: 17 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -46,11 +46,16 @@ class MBBank:
46
46
password (str): MBBank Account Password
47
47
proxy (str, optional): Proxy url. Example: "http://127.0.0.1:8080". Defaults to None.
48
48
ocr_class (CapchaProcessing, optional): instance of CapchaProcessing class. Defaults to CapchaOCR().
49
+
retry_times (int, optional): number of retry times for capcha processing. Defaults to 30 ( worst case ).
50
+
timeout (Union[float, Tuple[float, float]], optional): request timeout in seconds or (connect timeout, read timeout) or None for no timeout. Defaults to None.
pool=concurrent.futures.ThreadPoolExecutor() # thread pool for blocking tasks like OCR and wasm
15
20
16
-
pool=concurrent.futures.ThreadPoolExecutor() # thread pool for blocking tasks like OCR and wasm
17
21
18
22
classMBBankAsync(MBBank):
19
23
"""Core Async class
@@ -27,23 +31,40 @@ class MBBankAsync(MBBank):
27
31
password (str): MBBank Account Password
28
32
proxy (str, optional): Proxy url. Example: "http://127.0.0.1:8080". Defaults to None.
29
33
ocr_class (CapchaProcessing, optional): CapchaProcessing class. Defaults to CapchaOCR().
34
+
retry_times (int, optional): number of retry times for capcha processing. Defaults to 30 ( worst case ).
35
+
timeout (Union[float, Tuple[float, float]], optional): request timeout in seconds or (connect timeout, read timeout) or None for no timeout. Defaults to None.
0 commit comments