lazysdk 0.1.103__py3-none-any.whl → 0.1.104__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/lazyre.py +40 -0
- {lazysdk-0.1.103.dist-info → lazysdk-0.1.104.dist-info}/METADATA +1 -1
- {lazysdk-0.1.103.dist-info → lazysdk-0.1.104.dist-info}/RECORD +6 -5
- {lazysdk-0.1.103.dist-info → lazysdk-0.1.104.dist-info}/LICENSE +0 -0
- {lazysdk-0.1.103.dist-info → lazysdk-0.1.104.dist-info}/WHEEL +0 -0
- {lazysdk-0.1.103.dist-info → lazysdk-0.1.104.dist-info}/top_level.txt +0 -0
lazysdk/lazyre.py
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
import re
|
2
|
+
|
3
|
+
|
4
|
+
def find_between(
|
5
|
+
text: str,
|
6
|
+
left: str,
|
7
|
+
right: str,
|
8
|
+
until_line_end: bool = False # 是否匹配到行尾
|
9
|
+
):
|
10
|
+
"""
|
11
|
+
找两个之间
|
12
|
+
"""
|
13
|
+
if until_line_end:
|
14
|
+
return re.findall(pattern=f'{left}(.*?){right}$', string=text, flags=re.S)
|
15
|
+
else:
|
16
|
+
return re.findall(pattern=f'{left}(.*?){right}', string=text, flags=re.S)
|
17
|
+
|
18
|
+
|
19
|
+
def find_all(
|
20
|
+
text: str,
|
21
|
+
left: str,
|
22
|
+
right: str,
|
23
|
+
until_line_end: bool = False # 是否匹配到行尾
|
24
|
+
):
|
25
|
+
"""
|
26
|
+
找一个之后所有
|
27
|
+
"""
|
28
|
+
if until_line_end:
|
29
|
+
return re.findall(pattern=f'{left}(.*){right}$', string=text, flags=re.S)
|
30
|
+
else:
|
31
|
+
return re.findall(pattern=f'{left}(.*){right}', string=text, flags=re.S)
|
32
|
+
|
33
|
+
|
34
|
+
def find_chs(
|
35
|
+
text: str
|
36
|
+
):
|
37
|
+
"""
|
38
|
+
提取中文,目前不能去掉括号
|
39
|
+
"""
|
40
|
+
return re.sub(pattern="[A-Za-z0-9\!\%\[\]\,\。\ \']", repl="", string=text)
|
@@ -22,6 +22,7 @@ lazysdk/lazypath.py,sha256=4h7_yg5Hkt_vUnpr7kPodV1GwwYlyORLjJt3MYCIquM,6130
|
|
22
22
|
lazysdk/lazyprocess.py,sha256=Fmh2BLF1WkWA5N0FzF0D3d-8MvMJxSD6HmuFCXCeLUU,17702
|
23
23
|
lazysdk/lazyproxies.py,sha256=bljLKkP3WksZ6jOHhjS5-jSHdUBRH6gx-BxEZTPJeXc,546
|
24
24
|
lazysdk/lazyrandom.py,sha256=XZ8hTcNvc68FAI-BfaIt7QpCmzZ7m4RGDrfpy_U7zTw,1420
|
25
|
+
lazysdk/lazyre.py,sha256=9loFnQKSftWSOmBRp8miq3loSr_SIcKVs1t_jxTqrog,942
|
25
26
|
lazysdk/lazyredis.py,sha256=78jM_tXNgUKULcp08CQEHmfAlzwlWuOsl6SuLwoLDdM,37918
|
26
27
|
lazysdk/lazyrequests.py,sha256=qOUNkFhIThHNLALDTmOqPjKgMse5BVD-Kf9kheadMAY,3750
|
27
28
|
lazysdk/lazytext.py,sha256=1UgwxLt3c6i0JwUGRC7srSc_mhM3ICv1WrhOqkuIrLk,2672
|
@@ -32,8 +33,8 @@ lazysdk/lazywebhook.py,sha256=1YEerujxnAOgj1F4R-IX2juZDa5o_AFWgEp4gO92_60,8937
|
|
32
33
|
lazysdk/lazywifi.py,sha256=FOvLPTcb6BQE6D8kjfB0TLpfgGxw8jqC3vZbTs6LbD4,716
|
33
34
|
lazysdk/lazyxml.py,sha256=PLAcDWjpu2GMJPsV9dHOv716CVmflQee7Aan-hqGxL8,770
|
34
35
|
lazysdk/showdata.py,sha256=957JMXq7qfJ4ELpA3nBJwkyEUn6mRwtVXVBGYfZaCgg,1683
|
35
|
-
lazysdk-0.1.
|
36
|
-
lazysdk-0.1.
|
37
|
-
lazysdk-0.1.
|
38
|
-
lazysdk-0.1.
|
39
|
-
lazysdk-0.1.
|
36
|
+
lazysdk-0.1.104.dist-info/LICENSE,sha256=OC5E4ENUG6B4dGEVGwUpdsD-D9SZsCVC92NAgaqvE-c,1088
|
37
|
+
lazysdk-0.1.104.dist-info/METADATA,sha256=5pvk2TYopswOyYDGitFMpZssv4Iz6YwdSKn8Nju38Is,1915
|
38
|
+
lazysdk-0.1.104.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
39
|
+
lazysdk-0.1.104.dist-info/top_level.txt,sha256=--bGS42ZHUhVeO83y1wfvKFg6OjkTLxQ4V4riqPQljY,8
|
40
|
+
lazysdk-0.1.104.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|