lazysdk 0.1.70__tar.gz → 0.1.72__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.
- lazysdk-0.1.72/LICENSE +21 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/PKG-INFO +14 -1
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazydict.py +12 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyfile.py +15 -1
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk.egg-info/PKG-INFO +14 -1
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk.egg-info/SOURCES.txt +1 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/setup.py +1 -1
- {lazysdk-0.1.70 → lazysdk-0.1.72}/README.md +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/__init__.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyCrypto.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazy_id_card.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazybase64.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyenv.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyexcel.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyflask.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyhtml.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyid.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyinfo.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyip.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazym3u8.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazymd5.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazypath.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyprocess.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyproxies.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyrandom.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyredis.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyrequests.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazytext.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazytime.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyua.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyurl.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazywebhook.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazywifi.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/showdata.py +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk.egg-info/dependency_links.txt +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk.egg-info/requires.txt +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk.egg-info/top_level.txt +0 -0
- {lazysdk-0.1.70 → lazysdk-0.1.72}/setup.cfg +0 -0
lazysdk-0.1.72/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2023 ZeroSeeker
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: lazysdk
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.72
|
4
4
|
Summary: 基于Python的懒人包
|
5
5
|
Home-page: https://gitee.com/ZeroSeeker/lazysdk
|
6
6
|
Author: ZeroSeeker
|
@@ -9,6 +9,19 @@ Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
10
10
|
Classifier: Operating System :: OS Independent
|
11
11
|
Description-Content-Type: text/markdown
|
12
|
+
License-File: LICENSE
|
13
|
+
Requires-Dist: showlog>=0.0.6
|
14
|
+
Requires-Dist: requests>=2.31.0
|
15
|
+
Requires-Dist: envx>=1.0.1
|
16
|
+
Requires-Dist: pytz==2022.1
|
17
|
+
Requires-Dist: ua_parser==0.10.0
|
18
|
+
Requires-Dist: openpyxl==3.0.9
|
19
|
+
Requires-Dist: xlrd==2.0.1
|
20
|
+
Requires-Dist: m3u8==3.5.0
|
21
|
+
Requires-Dist: pycryptodome==3.10.1
|
22
|
+
Requires-Dist: filetype==1.2.0
|
23
|
+
Requires-Dist: netifaces==0.11.0
|
24
|
+
Requires-Dist: user_agents==2.2.0
|
12
25
|
|
13
26
|
# lazysdk
|
14
27
|

|
@@ -231,3 +231,15 @@ def list_same_order_dict(
|
|
231
231
|
each_dict_order[each_key] = each_dict.get(each_key, na_value)
|
232
232
|
list_data_f.append(each_dict_order)
|
233
233
|
return list_data_f
|
234
|
+
|
235
|
+
|
236
|
+
def list_dict_filter(
|
237
|
+
list_in: list,
|
238
|
+
filter_key,
|
239
|
+
filter_value
|
240
|
+
):
|
241
|
+
"""
|
242
|
+
从[{},{}]中按照某个key-value条件筛选出符合条件的记录
|
243
|
+
"""
|
244
|
+
list_out = list(filter(lambda x: x[filter_key] == filter_value, list_in))
|
245
|
+
return list_out
|
@@ -98,7 +98,7 @@ def download(
|
|
98
98
|
range_start: int = None,
|
99
99
|
range_end: int = None,
|
100
100
|
overwrite: bool = False,
|
101
|
-
verify: bool =
|
101
|
+
verify: bool = True
|
102
102
|
):
|
103
103
|
"""
|
104
104
|
实现文件下载功能,可指定url、文件名、后缀名、请求头、文件保存路径
|
@@ -112,6 +112,7 @@ def download(
|
|
112
112
|
:param range_start:开始位置
|
113
113
|
:param range_end:结束位置
|
114
114
|
:param overwrite: 覆盖
|
115
|
+
:param verify: 验证证书
|
115
116
|
:return:
|
116
117
|
"""
|
117
118
|
if not headers:
|
@@ -198,6 +199,19 @@ def download(
|
|
198
199
|
|
199
200
|
if overwrite and os.path.exists(path_local):
|
200
201
|
delete(file=path_local)
|
202
|
+
elif not overwrite and os.path.exists(path_local):
|
203
|
+
# 这里将对已存在的文件名重新命名
|
204
|
+
rename_count = 1
|
205
|
+
while True:
|
206
|
+
path_local_rename = os.path.join(path, download_file_name, "(", str(rename_count), ")")
|
207
|
+
if os.path.exists(path_local):
|
208
|
+
rename_count += 1
|
209
|
+
continue
|
210
|
+
else:
|
211
|
+
break
|
212
|
+
path_local = copy.deepcopy(path_local_rename)
|
213
|
+
else:
|
214
|
+
pass
|
201
215
|
|
202
216
|
with open(path_local, "ab") as f: # wb新建文件,a追加
|
203
217
|
for chunk in response.iter_content(chunk_size=chunk_size):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: lazysdk
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.72
|
4
4
|
Summary: 基于Python的懒人包
|
5
5
|
Home-page: https://gitee.com/ZeroSeeker/lazysdk
|
6
6
|
Author: ZeroSeeker
|
@@ -9,6 +9,19 @@ Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
10
10
|
Classifier: Operating System :: OS Independent
|
11
11
|
Description-Content-Type: text/markdown
|
12
|
+
License-File: LICENSE
|
13
|
+
Requires-Dist: showlog>=0.0.6
|
14
|
+
Requires-Dist: requests>=2.31.0
|
15
|
+
Requires-Dist: envx>=1.0.1
|
16
|
+
Requires-Dist: pytz==2022.1
|
17
|
+
Requires-Dist: ua_parser==0.10.0
|
18
|
+
Requires-Dist: openpyxl==3.0.9
|
19
|
+
Requires-Dist: xlrd==2.0.1
|
20
|
+
Requires-Dist: m3u8==3.5.0
|
21
|
+
Requires-Dist: pycryptodome==3.10.1
|
22
|
+
Requires-Dist: filetype==1.2.0
|
23
|
+
Requires-Dist: netifaces==0.11.0
|
24
|
+
Requires-Dist: user_agents==2.2.0
|
12
25
|
|
13
26
|
# lazysdk
|
14
27
|

|
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
|
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
|