lazysdk 0.1.71__py3-none-any.whl → 0.1.72__py3-none-any.whl

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/lazyfile.py CHANGED
@@ -199,6 +199,19 @@ def download(
199
199
 
200
200
  if overwrite and os.path.exists(path_local):
201
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
202
215
 
203
216
  with open(path_local, "ab") as f: # wb新建文件,a追加
204
217
  for chunk in response.iter_content(chunk_size=chunk_size):
@@ -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.71
3
+ Version: 0.1.72
4
4
  Summary: 基于Python的懒人包
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazysdk
6
6
  Author: ZeroSeeker
@@ -9,18 +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
- Requires-Dist: showlog (>=0.0.6)
13
- Requires-Dist: requests (>=2.31.0)
14
- Requires-Dist: envx (>=1.0.1)
15
- Requires-Dist: pytz (==2022.1)
16
- Requires-Dist: ua-parser (==0.10.0)
17
- Requires-Dist: openpyxl (==3.0.9)
18
- Requires-Dist: xlrd (==2.0.1)
19
- Requires-Dist: m3u8 (==3.5.0)
20
- Requires-Dist: pycryptodome (==3.10.1)
21
- Requires-Dist: filetype (==1.2.0)
22
- Requires-Dist: netifaces (==0.11.0)
23
- Requires-Dist: user-agents (==2.2.0)
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
24
25
 
25
26
  # lazysdk
26
27
  ![](https://img.shields.io/badge/Python-3.8.6-green.svg)
@@ -5,7 +5,7 @@ lazysdk/lazybase64.py,sha256=8jtuH9S1jICXpzxhRLe7xNur_o9TWbT1BRmTshZWYh0,669
5
5
  lazysdk/lazydict.py,sha256=E0oSF6qsBvtWtzQsi_sNNL3SyLGaRvSvuRL9avCPTqE,7916
6
6
  lazysdk/lazyenv.py,sha256=P6HjO9cbBPzHD_Vs-Ww_GThDq-h9Wn31VSiu9OzTNWI,3024
7
7
  lazysdk/lazyexcel.py,sha256=r8_VbCzB1dRhMbK4Dwk-cr5keJCo6AV4r8SYe4O5y6k,15129
8
- lazysdk/lazyfile.py,sha256=Jx2c9G-0M-_DYSg0waKVPDP3Arffk4Sf0XjMV4EvSUE,20375
8
+ lazysdk/lazyfile.py,sha256=93ssoJ8yB5GmxRljM5PYwYLzppn-NkO7wDXhHE3Ngd4,20850
9
9
  lazysdk/lazyflask.py,sha256=VUhJqtNz_evVyGOS40FKkkQWWrqGEUZ26cv1RQxS388,727
10
10
  lazysdk/lazyhtml.py,sha256=vTtiLPoAhWMzXsDBFsF0DoFSsKbfmuEPjPMOZI_n6ag,1867
11
11
  lazysdk/lazyid.py,sha256=pEmRpN78-6vdz4hzLxgoCSHJw6gvnOVQyNjqusZZLQE,607
@@ -26,7 +26,8 @@ lazysdk/lazyurl.py,sha256=N89QLK2A6vXr9gqp-9vnk9RXv_fOjw171lVl9eEoxtE,1550
26
26
  lazysdk/lazywebhook.py,sha256=HwJIZ5j3wUpnEfPkFY-Xq9T_9xdhCJ71dYsWNX22_3Y,8386
27
27
  lazysdk/lazywifi.py,sha256=FOvLPTcb6BQE6D8kjfB0TLpfgGxw8jqC3vZbTs6LbD4,716
28
28
  lazysdk/showdata.py,sha256=v9TrDWrLl0Fn2JzDzfiISYlZS3uumIXpm9Dpix2XAXg,1678
29
- lazysdk-0.1.71.dist-info/METADATA,sha256=Ms3ymDjwsy89viKJ7Cc0yza7cpGJzRdNR200SG1UjGY,1775
30
- lazysdk-0.1.71.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
31
- lazysdk-0.1.71.dist-info/top_level.txt,sha256=--bGS42ZHUhVeO83y1wfvKFg6OjkTLxQ4V4riqPQljY,8
32
- lazysdk-0.1.71.dist-info/RECORD,,
29
+ lazysdk-0.1.72.dist-info/LICENSE,sha256=OC5E4ENUG6B4dGEVGwUpdsD-D9SZsCVC92NAgaqvE-c,1088
30
+ lazysdk-0.1.72.dist-info/METADATA,sha256=txZznpcBGZLB3M5KmYFpv58s8Vc7E2YYOS7doTUMIrM,1773
31
+ lazysdk-0.1.72.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
32
+ lazysdk-0.1.72.dist-info/top_level.txt,sha256=--bGS42ZHUhVeO83y1wfvKFg6OjkTLxQ4V4riqPQljY,8
33
+ lazysdk-0.1.72.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.38.4)
2
+ Generator: bdist_wheel (0.41.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5