pyscriptbase 1.1.0__tar.gz → 1.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyscriptbase-1.1.2/PKG-INFO +30 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase/script.py +13 -4
- pyscriptbase-1.1.2/pyscriptbase.egg-info/PKG-INFO +30 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase.egg-info/requires.txt +1 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/setup.py +2 -1
- pyscriptbase-1.1.0/PKG-INFO +0 -12
- pyscriptbase-1.1.0/pyscriptbase.egg-info/PKG-INFO +0 -12
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/README.md +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase/__init__.py +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase/app.py +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase/cipher.py +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase/database.py +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase/env.py +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase/net.py +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase/panel.py +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase/pusher.py +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase/util.py +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase/webview.py +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase.egg-info/SOURCES.txt +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase.egg-info/dependency_links.txt +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/pyscriptbase.egg-info/top_level.txt +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/setup.cfg +0 -0
- {pyscriptbase-1.1.0 → pyscriptbase-1.1.2}/test/test.py +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyscriptbase
|
|
3
|
+
Version: 1.1.2
|
|
4
|
+
Summary: python script base library
|
|
5
|
+
Home-page:
|
|
6
|
+
Author: ASMan
|
|
7
|
+
Author-email:
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: loguru
|
|
10
|
+
Requires-Dist: selenium
|
|
11
|
+
Requires-Dist: pymysql
|
|
12
|
+
Requires-Dist: pycryptodome
|
|
13
|
+
Requires-Dist: pyyaml
|
|
14
|
+
Requires-Dist: xmltodict
|
|
15
|
+
Requires-Dist: prettytable
|
|
16
|
+
Requires-Dist: pyjwt
|
|
17
|
+
Requires-Dist: fake_useragent
|
|
18
|
+
Requires-Dist: beautifulsoup4
|
|
19
|
+
Requires-Dist: requests
|
|
20
|
+
Requires-Dist: lxml
|
|
21
|
+
Requires-Dist: brotli
|
|
22
|
+
Dynamic: author
|
|
23
|
+
Dynamic: description
|
|
24
|
+
Dynamic: description-content-type
|
|
25
|
+
Dynamic: requires-dist
|
|
26
|
+
Dynamic: summary
|
|
27
|
+
|
|
28
|
+
# Instructions
|
|
29
|
+
|
|
30
|
+
python script base library
|
|
@@ -2,6 +2,7 @@ from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
|
2
2
|
from traceback import format_exc
|
|
3
3
|
from . import net
|
|
4
4
|
from . import database
|
|
5
|
+
import random
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
class ScriptApp:
|
|
@@ -12,8 +13,10 @@ class ScriptApp:
|
|
|
12
13
|
self,
|
|
13
14
|
index: int = 1,
|
|
14
15
|
useProxy: bool = True,
|
|
16
|
+
randomProxy: bool = False,
|
|
15
17
|
debug: bool = False,
|
|
16
18
|
useCloud: bool = True,
|
|
19
|
+
randomCloud: bool = False,
|
|
17
20
|
) -> None:
|
|
18
21
|
self.index = index
|
|
19
22
|
self.logs = []
|
|
@@ -21,6 +24,8 @@ class ScriptApp:
|
|
|
21
24
|
self.net = net.NetRequest()
|
|
22
25
|
self.cloudNet = net.CloudRequest()
|
|
23
26
|
self.cloudNet.net = self.net
|
|
27
|
+
self.randomProxy = randomProxy
|
|
28
|
+
self.randomCloud = randomCloud
|
|
24
29
|
useProxy and self.__setProxy__(index)
|
|
25
30
|
useCloud and self.__setCloudProxy__(index)
|
|
26
31
|
|
|
@@ -57,7 +62,10 @@ class ScriptApp:
|
|
|
57
62
|
except:
|
|
58
63
|
ScriptApp._proxies = [None]
|
|
59
64
|
if len(ScriptApp._proxies):
|
|
60
|
-
self.
|
|
65
|
+
if self.randomProxy:
|
|
66
|
+
self.net.proxies = random.choice(ScriptApp._proxies)
|
|
67
|
+
else:
|
|
68
|
+
self.net.proxies = ScriptApp._proxies[index % len(ScriptApp._proxies)]
|
|
61
69
|
|
|
62
70
|
def __setCloudProxy__(self, index: int) -> None:
|
|
63
71
|
config = database.getDataConfig("account", "cloud_proxy")
|
|
@@ -84,9 +92,10 @@ class ScriptApp:
|
|
|
84
92
|
except:
|
|
85
93
|
ScriptApp._cloudProxies = []
|
|
86
94
|
if len(ScriptApp._cloudProxies):
|
|
87
|
-
self.
|
|
88
|
-
|
|
89
|
-
|
|
95
|
+
if self.randomCloud:
|
|
96
|
+
self.cloudNet.cloud = random.choice(ScriptApp._cloudProxies)
|
|
97
|
+
else:
|
|
98
|
+
self.cloudNet.cloud = ScriptApp._cloudProxies[index % len(ScriptApp._cloudProxies)]
|
|
90
99
|
|
|
91
100
|
def __log__(self, msg: str | dict = "", flush: bool = False):
|
|
92
101
|
if flush or self.debug:
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyscriptbase
|
|
3
|
+
Version: 1.1.2
|
|
4
|
+
Summary: python script base library
|
|
5
|
+
Home-page:
|
|
6
|
+
Author: ASMan
|
|
7
|
+
Author-email:
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: loguru
|
|
10
|
+
Requires-Dist: selenium
|
|
11
|
+
Requires-Dist: pymysql
|
|
12
|
+
Requires-Dist: pycryptodome
|
|
13
|
+
Requires-Dist: pyyaml
|
|
14
|
+
Requires-Dist: xmltodict
|
|
15
|
+
Requires-Dist: prettytable
|
|
16
|
+
Requires-Dist: pyjwt
|
|
17
|
+
Requires-Dist: fake_useragent
|
|
18
|
+
Requires-Dist: beautifulsoup4
|
|
19
|
+
Requires-Dist: requests
|
|
20
|
+
Requires-Dist: lxml
|
|
21
|
+
Requires-Dist: brotli
|
|
22
|
+
Dynamic: author
|
|
23
|
+
Dynamic: description
|
|
24
|
+
Dynamic: description-content-type
|
|
25
|
+
Dynamic: requires-dist
|
|
26
|
+
Dynamic: summary
|
|
27
|
+
|
|
28
|
+
# Instructions
|
|
29
|
+
|
|
30
|
+
python script base library
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="pyscriptbase", # 包名
|
|
5
|
-
version="1.1.
|
|
5
|
+
version="1.1.2", # 版本号
|
|
6
6
|
packages=find_packages(), # 自动查找包
|
|
7
7
|
author="ASMan",
|
|
8
8
|
author_email="",
|
|
@@ -23,5 +23,6 @@ setup(
|
|
|
23
23
|
"beautifulsoup4",
|
|
24
24
|
"requests",
|
|
25
25
|
"lxml",
|
|
26
|
+
"brotli"
|
|
26
27
|
], # 依赖包列表
|
|
27
28
|
)
|
pyscriptbase-1.1.0/PKG-INFO
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|