selectolax 0.3.28__cp312-cp312-musllinux_1_2_aarch64.whl → 0.3.29__cp312-cp312-musllinux_1_2_aarch64.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.
Potentially problematic release.
This version of selectolax might be problematic. Click here for more details.
- selectolax/__init__.py +1 -1
- selectolax/lexbor/node.pxi +16 -4
- selectolax/lexbor.c +1734 -1602
- selectolax/lexbor.cpython-312-aarch64-linux-musl.so +0 -0
- selectolax/lexbor.pyi +2 -2
- selectolax/lexbor.pyx +4 -2
- selectolax/modest/node.pxi +21 -5
- selectolax/parser.c +1860 -1706
- selectolax/parser.cpython-312-aarch64-linux-musl.so +0 -0
- selectolax/parser.pyi +13 -20
- selectolax/parser.pyx +4 -2
- {selectolax-0.3.28.dist-info → selectolax-0.3.29.dist-info}/METADATA +1 -1
- selectolax-0.3.29.dist-info/RECORD +26 -0
- selectolax-0.3.28.dist-info/RECORD +0 -26
- {selectolax-0.3.28.dist-info → selectolax-0.3.29.dist-info}/LICENSE +0 -0
- {selectolax-0.3.28.dist-info → selectolax-0.3.29.dist-info}/WHEEL +0 -0
- {selectolax-0.3.28.dist-info → selectolax-0.3.29.dist-info}/top_level.txt +0 -0
|
Binary file
|
selectolax/parser.pyi
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import
|
|
1
|
+
from typing import Iterator, TypeVar, Literal, overload
|
|
2
2
|
|
|
3
3
|
DefaultT = TypeVar("DefaultT")
|
|
4
4
|
|
|
@@ -146,17 +146,13 @@ class Node:
|
|
|
146
146
|
...
|
|
147
147
|
@overload
|
|
148
148
|
def css_first(
|
|
149
|
-
|
|
150
|
-
) -> Node:
|
|
151
|
-
|
|
152
|
-
def css_first(
|
|
153
|
-
self, query: str, default: DefaultT, strict: bool = False
|
|
154
|
-
) -> Node | DefaultT: ...
|
|
149
|
+
self, query: str, default: DefaultT, strict: bool = False
|
|
150
|
+
) -> Node | DefaultT:
|
|
151
|
+
...
|
|
155
152
|
@overload
|
|
156
153
|
def css_first(
|
|
157
|
-
|
|
158
|
-
) -> Node | None:
|
|
159
|
-
"""Evaluate CSS selector against current node and its child nodes."""
|
|
154
|
+
self, query: str, default: None = None, strict: bool = False
|
|
155
|
+
) -> Node | None | DefaultT:
|
|
160
156
|
...
|
|
161
157
|
def decompose(self, recursive: bool = True) -> None:
|
|
162
158
|
"""Remove a Node from the tree."""
|
|
@@ -170,7 +166,7 @@ class Node:
|
|
|
170
166
|
def strip_tags(self, tags: list[str], recursive: bool = False) -> None:
|
|
171
167
|
"""Remove specified tags from the HTML tree."""
|
|
172
168
|
...
|
|
173
|
-
def unwrap_tags(self, tags: list[str]) -> None:
|
|
169
|
+
def unwrap_tags(self, tags: list[str], delete_empty: bool = False) -> None:
|
|
174
170
|
"""Unwraps specified tags from the HTML tree.
|
|
175
171
|
|
|
176
172
|
Works the same as the unwrap method, but applied to a list of tags."""
|
|
@@ -236,18 +232,15 @@ class HTMLParser:
|
|
|
236
232
|
Matches pattern query against HTML tree."""
|
|
237
233
|
...
|
|
238
234
|
@overload
|
|
239
|
-
def css_first(
|
|
240
|
-
self, query: str, default: Any = ..., strict: Literal[True] = ...
|
|
241
|
-
) -> Node: ...
|
|
242
|
-
@overload
|
|
243
235
|
def css_first(
|
|
244
236
|
self, query: str, default: DefaultT, strict: bool = False
|
|
245
|
-
) -> Node | DefaultT:
|
|
237
|
+
) -> Node | DefaultT:
|
|
238
|
+
...
|
|
239
|
+
|
|
246
240
|
@overload
|
|
247
241
|
def css_first(
|
|
248
|
-
|
|
249
|
-
) -> Node | None:
|
|
250
|
-
"""Same as css but returns only the first match."""
|
|
242
|
+
self, query: str, default: None = None, strict: bool = False
|
|
243
|
+
) -> Node | None | DefaultT:
|
|
251
244
|
...
|
|
252
245
|
@property
|
|
253
246
|
def input_encoding(self) -> str:
|
|
@@ -274,7 +267,7 @@ class HTMLParser:
|
|
|
274
267
|
"""Returns the text of the node including text of all its child nodes."""
|
|
275
268
|
...
|
|
276
269
|
def strip_tags(self, tags: list[str], recursive: bool = False) -> None: ...
|
|
277
|
-
def unwrap_tags(self, tags: list[str]) -> None:
|
|
270
|
+
def unwrap_tags(self, tags: list[str], delete_empty: bool = False) -> None:
|
|
278
271
|
"""Unwraps specified tags from the HTML tree.
|
|
279
272
|
|
|
280
273
|
Works the same as th unwrap method, but applied to a list of tags."""
|
selectolax/parser.pyx
CHANGED
|
@@ -269,7 +269,7 @@ cdef class HTMLParser:
|
|
|
269
269
|
myhtml_collection_destroy(collection)
|
|
270
270
|
|
|
271
271
|
|
|
272
|
-
def unwrap_tags(self, list tags):
|
|
272
|
+
def unwrap_tags(self, list tags, delete_empty : bool = False):
|
|
273
273
|
"""Unwraps specified tags from the HTML tree.
|
|
274
274
|
|
|
275
275
|
Works the same as th `unwrap` method, but applied to a list of tags.
|
|
@@ -278,6 +278,8 @@ cdef class HTMLParser:
|
|
|
278
278
|
----------
|
|
279
279
|
tags : list
|
|
280
280
|
List of tags to remove.
|
|
281
|
+
delete_empty : bool, default False
|
|
282
|
+
If True, removes empty tags.
|
|
281
283
|
|
|
282
284
|
Examples
|
|
283
285
|
--------
|
|
@@ -288,7 +290,7 @@ cdef class HTMLParser:
|
|
|
288
290
|
'<body><div>Hello world!</div></body>'
|
|
289
291
|
"""
|
|
290
292
|
if self.root is not None:
|
|
291
|
-
self.root.unwrap_tags(tags)
|
|
293
|
+
self.root.unwrap_tags(tags, delete_empty=delete_empty)
|
|
292
294
|
|
|
293
295
|
@property
|
|
294
296
|
def html(self):
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
selectolax-0.3.29.dist-info/top_level.txt,sha256=e5MuEM2PrQzoDlWetkFli9uXSlxa_ktW5jJEihhaI1c,11
|
|
2
|
+
selectolax-0.3.29.dist-info/METADATA,sha256=psjueWhyKDLmG66FhXi1EKCDxfmA_4SLEXS84DQQZt0,6060
|
|
3
|
+
selectolax-0.3.29.dist-info/LICENSE,sha256=MYCcM-Cv_rC2-lQiwDumin0E-rMXAhK-qIGGA29434Y,1077
|
|
4
|
+
selectolax-0.3.29.dist-info/RECORD,,
|
|
5
|
+
selectolax-0.3.29.dist-info/WHEEL,sha256=Rq62fCot2seFXOtCVDa5iEGouiHLJNpAK5Brxd2iXH8,113
|
|
6
|
+
selectolax/parser.cpython-312-aarch64-linux-musl.so,sha256=q-j_wd5iVkAQ-N0rhmR5BFC_qqDoZho1y7edFkqAeto,7877616
|
|
7
|
+
selectolax/utils.pxi,sha256=uB0-0naFQPy1JpR2DiIlKnyLyC76yWLnUHSuH11xg6s,3459
|
|
8
|
+
selectolax/lexbor.cpython-312-aarch64-linux-musl.so,sha256=Ky5L5AF6yqcGAp_qhZSNVasy7poRK9tSOyMgJLze5FI,9564320
|
|
9
|
+
selectolax/lexbor.pyi,sha256=WFfpFEmhmvUc3qRJJ4mZxiXAePqdg2_Ud35eQ4jlaqU,6610
|
|
10
|
+
selectolax/base.pxi,sha256=eiPKlY9gG3l49qJoRQVLl1Ljza6z1k0A-met6sDPcqE,89
|
|
11
|
+
selectolax/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
+
selectolax/parser.pxd,sha256=zZlg1vHUg6o4MXaiwKAo5S5hO_DqBGc4_E10qJ2EcM4,24564
|
|
13
|
+
selectolax/parser.c,sha256=Xl4naiO53VdzRcVWqws6koZNRRqpErvTy09qHIrvbtQ,2224633
|
|
14
|
+
selectolax/lexbor.pyx,sha256=EnFRvKRVoRhxg6r4vcQ89eWYUDFRlCRDm4cBRlQZnDY,11002
|
|
15
|
+
selectolax/lexbor.pxd,sha256=PwygBdb1blWAQcxXubZS5uffhgcXaqgySNMPFMT02-c,20958
|
|
16
|
+
selectolax/lexbor.c,sha256=nmcIPSc9LZpbSFQLylDDVTDVU0uy0xHp4NiS_n6NM3k,2368108
|
|
17
|
+
selectolax/parser.pyx,sha256=GCdlRtpNKgCYsRS6iOnjKr_5GhZNcAaFMBQZSWLye8A,13093
|
|
18
|
+
selectolax/parser.pyi,sha256=6S9RKAevzv9zBYL1v12qQojkMst35yzy3TnD3HtZZo4,11275
|
|
19
|
+
selectolax/__init__.py,sha256=J5aFJ2fot0JTvAyn1K0rx3Ux6jaDJXJF1Uo4Zct_1Jw,175
|
|
20
|
+
selectolax/modest/selection.pxi,sha256=S55MMxEW2B1oPExB_DRwPM46WoWZU73J3rFRZU1URuQ,6393
|
|
21
|
+
selectolax/modest/node.pxi,sha256=8lX5cmGbX_X4Z9OuPpZ-P-5jne5k_-ck1hU-152e20Y,33315
|
|
22
|
+
selectolax/modest/util.pxi,sha256=aX9UnRNTITImHVBTlIs9efOd3EyugLq_Lwuo0zVTiuQ,551
|
|
23
|
+
selectolax/lexbor/selection.pxi,sha256=FA6npHtXjJjvS8H2_e_LS53i5zbpGYgb5zTh5Tf_XQY,6571
|
|
24
|
+
selectolax/lexbor/attrs.pxi,sha256=Ol2RNzXZAcWaqJdDBUe0ChOCcA8HC990Hjncj98XAkw,3138
|
|
25
|
+
selectolax/lexbor/node.pxi,sha256=_-zlshCku6gmCcpIuxfbkqZHVyihReyDmEK3QgYLVdg,29884
|
|
26
|
+
selectolax/lexbor/util.pxi,sha256=Zq7S-zlyU3wOo49wGHQHnmmhpbkrcJm59ZCTPENcZQA,563
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
selectolax-0.3.28.dist-info/LICENSE,sha256=MYCcM-Cv_rC2-lQiwDumin0E-rMXAhK-qIGGA29434Y,1077
|
|
2
|
-
selectolax-0.3.28.dist-info/WHEEL,sha256=Rq62fCot2seFXOtCVDa5iEGouiHLJNpAK5Brxd2iXH8,113
|
|
3
|
-
selectolax-0.3.28.dist-info/METADATA,sha256=vTdwlSLUc9k1DeDfD4h5ZcM0cB0aIgShNit3UMiniAU,6060
|
|
4
|
-
selectolax-0.3.28.dist-info/top_level.txt,sha256=e5MuEM2PrQzoDlWetkFli9uXSlxa_ktW5jJEihhaI1c,11
|
|
5
|
-
selectolax-0.3.28.dist-info/RECORD,,
|
|
6
|
-
selectolax/parser.pxd,sha256=zZlg1vHUg6o4MXaiwKAo5S5hO_DqBGc4_E10qJ2EcM4,24564
|
|
7
|
-
selectolax/__init__.py,sha256=IhnQaAtBWz03SUIe66y78uQqmWBontg4z13rRupwa7Q,175
|
|
8
|
-
selectolax/base.pxi,sha256=eiPKlY9gG3l49qJoRQVLl1Ljza6z1k0A-met6sDPcqE,89
|
|
9
|
-
selectolax/lexbor.pyi,sha256=gf0rPd2B1EZyz_oN6EER-wFojg__Sz18GwjjVYo7SkU,6552
|
|
10
|
-
selectolax/lexbor.cpython-312-aarch64-linux-musl.so,sha256=IWpebA7O2lWyBgv6iQkxABKIs4AyYeIv3ubAfifCuDY,9554104
|
|
11
|
-
selectolax/parser.pyi,sha256=qLkvStGG4K3daXChLChzPHGV5w5gmIEMvFwRpC_Q4EM,11561
|
|
12
|
-
selectolax/utils.pxi,sha256=uB0-0naFQPy1JpR2DiIlKnyLyC76yWLnUHSuH11xg6s,3459
|
|
13
|
-
selectolax/parser.c,sha256=yd8gEU0netTAe3rf5haknFFz-QtMHTi6nhKGW5GUTTE,2214825
|
|
14
|
-
selectolax/lexbor.pxd,sha256=PwygBdb1blWAQcxXubZS5uffhgcXaqgySNMPFMT02-c,20958
|
|
15
|
-
selectolax/lexbor.pyx,sha256=rpb32yQ2E_6nJeaPDQs3kb3GFoALZqQbVCN35kcUM-M,10882
|
|
16
|
-
selectolax/parser.cpython-312-aarch64-linux-musl.so,sha256=ftoVMdSD1REn8T0y3jJarveucZIQwa-y6AlxR-oYCwU,7799464
|
|
17
|
-
selectolax/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
selectolax/parser.pyx,sha256=o1HkYE_nQr3TS7EPlldJx2-ygU9B5FI2uWYFzdF-VaI,12953
|
|
19
|
-
selectolax/lexbor.c,sha256=UkiarPPcp6IKa-HMZLnhap1CRltADEZdwsDWo5EviLQ,2359509
|
|
20
|
-
selectolax/modest/util.pxi,sha256=aX9UnRNTITImHVBTlIs9efOd3EyugLq_Lwuo0zVTiuQ,551
|
|
21
|
-
selectolax/modest/node.pxi,sha256=NrMzJnQJDCmgTHpUxpMHDyAfQ_AS_n_Cr_2ryEKjyL0,32550
|
|
22
|
-
selectolax/modest/selection.pxi,sha256=S55MMxEW2B1oPExB_DRwPM46WoWZU73J3rFRZU1URuQ,6393
|
|
23
|
-
selectolax/lexbor/attrs.pxi,sha256=Ol2RNzXZAcWaqJdDBUe0ChOCcA8HC990Hjncj98XAkw,3138
|
|
24
|
-
selectolax/lexbor/util.pxi,sha256=Zq7S-zlyU3wOo49wGHQHnmmhpbkrcJm59ZCTPENcZQA,563
|
|
25
|
-
selectolax/lexbor/node.pxi,sha256=-cqsA4gz9yL6hCte6uGgdQKvhIBZF_BZc_xHJn0rkCM,29340
|
|
26
|
-
selectolax/lexbor/selection.pxi,sha256=FA6npHtXjJjvS8H2_e_LS53i5zbpGYgb5zTh5Tf_XQY,6571
|
|
File without changes
|
|
File without changes
|
|
File without changes
|