selectolax 0.3.27__cp310-cp310-win32.whl → 0.3.28__cp310-cp310-win32.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/attrs.pxi +2 -1
- selectolax/lexbor/node.pxi +1 -1
- selectolax/lexbor/selection.pxi +12 -10
- selectolax/lexbor.c +1001 -879
- selectolax/lexbor.cp310-win32.pyd +0 -0
- selectolax/lexbor.pyi +1 -1
- selectolax/lexbor.pyx +4 -2
- selectolax/parser.cp310-win32.pyd +0 -0
- selectolax/parser.pyi +2 -2
- {selectolax-0.3.27.dist-info → selectolax-0.3.28.dist-info}/LICENSE +1 -1
- {selectolax-0.3.27.dist-info → selectolax-0.3.28.dist-info}/METADATA +18 -2
- selectolax-0.3.28.dist-info/RECORD +26 -0
- {selectolax-0.3.27.dist-info → selectolax-0.3.28.dist-info}/WHEEL +1 -1
- selectolax-0.3.27.dist-info/RECORD +0 -26
- {selectolax-0.3.27.dist-info → selectolax-0.3.28.dist-info}/top_level.txt +0 -0
|
Binary file
|
selectolax/lexbor.pyi
CHANGED
|
@@ -117,7 +117,7 @@ class LexborNode:
|
|
|
117
117
|
def text_content(self) -> str | None: ...
|
|
118
118
|
|
|
119
119
|
class LexborHTMLParser:
|
|
120
|
-
def __init__(self, html: str): ...
|
|
120
|
+
def __init__(self, html: str| bytes ): ...
|
|
121
121
|
@property
|
|
122
122
|
def selector(self) -> "LexborCSSSelector": ...
|
|
123
123
|
@property
|
selectolax/lexbor.pyx
CHANGED
|
@@ -112,6 +112,7 @@ cdef class LexborHTMLParser:
|
|
|
112
112
|
len(pybyte_name)
|
|
113
113
|
)
|
|
114
114
|
if status != 0x0000:
|
|
115
|
+
lxb_dom_collection_destroy(collection, <bint> True)
|
|
115
116
|
raise SelectolaxError("Can't locate elements.")
|
|
116
117
|
|
|
117
118
|
for i in range(lxb_dom_collection_length_noi(collection)):
|
|
@@ -226,13 +227,14 @@ cdef class LexborHTMLParser:
|
|
|
226
227
|
len(pybyte_name)
|
|
227
228
|
)
|
|
228
229
|
if status != 0x0000:
|
|
230
|
+
lxb_dom_collection_destroy(collection, <bint> True)
|
|
229
231
|
raise SelectolaxError("Can't locate elements.")
|
|
230
232
|
|
|
231
233
|
for i in range(lxb_dom_collection_length_noi(collection)):
|
|
232
234
|
if recursive:
|
|
233
|
-
lxb_dom_node_destroy( <lxb_dom_node_t*> lxb_dom_collection_element_noi(collection, i))
|
|
234
|
-
else:
|
|
235
235
|
lxb_dom_node_destroy_deep( <lxb_dom_node_t*> lxb_dom_collection_element_noi(collection, i))
|
|
236
|
+
else:
|
|
237
|
+
lxb_dom_node_destroy(<lxb_dom_node_t *> lxb_dom_collection_element_noi(collection, i))
|
|
236
238
|
lxb_dom_collection_destroy(collection, <bint> True)
|
|
237
239
|
|
|
238
240
|
def select(self, query=None):
|
|
Binary file
|
selectolax/parser.pyi
CHANGED
|
@@ -53,14 +53,14 @@ class Selector:
|
|
|
53
53
|
) -> bool:
|
|
54
54
|
"""Returns True if any node in the current search scope contains specified text"""
|
|
55
55
|
...
|
|
56
|
-
def
|
|
56
|
+
def attribute_longer_than(
|
|
57
57
|
self, text: str, length: int, start: str | None = None
|
|
58
58
|
) -> Selector:
|
|
59
59
|
"""Filter all current matches by attribute length.
|
|
60
60
|
|
|
61
61
|
Similar to string-length in XPath."""
|
|
62
62
|
...
|
|
63
|
-
def
|
|
63
|
+
def any_attribute_longer_than(
|
|
64
64
|
self, text: str, length: int, start: str | None = None
|
|
65
65
|
) -> bool:
|
|
66
66
|
"""Returns True any href attribute longer than a specified length.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
MIT License
|
|
3
3
|
|
|
4
|
-
Copyright (c) 2018-
|
|
4
|
+
Copyright (c) 2018-2025, Artem Golubin
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: selectolax
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.28
|
|
4
4
|
Summary: Fast HTML5 parser with CSS selectors.
|
|
5
5
|
Home-page: https://github.com/rushter/selectolax
|
|
6
6
|
Author: Artem Golubin
|
|
@@ -26,6 +26,16 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
26
26
|
License-File: LICENSE
|
|
27
27
|
Provides-Extra: cython
|
|
28
28
|
Requires-Dist: Cython==3.0.11; extra == "cython"
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: author-email
|
|
31
|
+
Dynamic: classifier
|
|
32
|
+
Dynamic: description
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: keywords
|
|
35
|
+
Dynamic: license
|
|
36
|
+
Dynamic: project-url
|
|
37
|
+
Dynamic: provides-extra
|
|
38
|
+
Dynamic: summary
|
|
29
39
|
|
|
30
40
|
.. image:: docs/logo.png
|
|
31
41
|
:alt: selectolax logo
|
|
@@ -75,6 +85,10 @@ How to compile selectolax while developing:
|
|
|
75
85
|
Basic examples
|
|
76
86
|
--------------
|
|
77
87
|
|
|
88
|
+
Here are some basic examples to get you started with selectolax:
|
|
89
|
+
|
|
90
|
+
Parsing HTML and extracting text:
|
|
91
|
+
|
|
78
92
|
.. code:: python
|
|
79
93
|
|
|
80
94
|
In [1]: from selectolax.parser import HTMLParser
|
|
@@ -97,6 +111,8 @@ Basic examples
|
|
|
97
111
|
['Lorem Ipsum is simply dummy text of the printing and typesetting industry. ',
|
|
98
112
|
'Lorem ipsum dolor sit amet, consectetur adipiscing elit.']
|
|
99
113
|
|
|
114
|
+
Using advanced CSS selectors:
|
|
115
|
+
|
|
100
116
|
.. code:: python
|
|
101
117
|
|
|
102
118
|
In [1]: html = "<div><p id=p1><p id=p2><p id=p3><a>link</a><p id=p4><p id=p5>text<p id=p6></div>"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
selectolax/__init__.py,sha256=IMgHVlDkSCVB-D4ya7t6eqh3wvTxHwRpxOvV6ybw-Lw,185
|
|
2
|
+
selectolax/base.pxi,sha256=zOj3BrCA71xd-mJFtkMIAglP4ZybfrHVoCoy6ljTBDQ,93
|
|
3
|
+
selectolax/lexbor.c,sha256=MhYWIykOeMA_wy7HgT21MquiN6k_95j-I7U5jEqY8rs,2360252
|
|
4
|
+
selectolax/lexbor.cp310-win32.pyd,sha256=NMF1pqU0Xr0YO3xMBYprv6xxpr-UWb8jLwdqu0X4zBs,2642944
|
|
5
|
+
selectolax/lexbor.pxd,sha256=1d9nvZd9rZl27gwPwVV5BlbR2LAi6jDK69Xm9Guz5Kk,21538
|
|
6
|
+
selectolax/lexbor.pyi,sha256=32Ky5eZkOAPc4pN3m-eZQy4EJQV7O8xUwGHOWkOI06o,6724
|
|
7
|
+
selectolax/lexbor.pyx,sha256=CYorl52H--UfKOihmZn7SxVIjl2GYvSVh3Lg9YMRACU,11231
|
|
8
|
+
selectolax/parser.c,sha256=rGXXnE3kJJDElEps9cQMYaIfXCCxVpDk5ELR-RQF5nk,2215098
|
|
9
|
+
selectolax/parser.cp310-win32.pyd,sha256=EJiZzTrr_5cAVEpMueeeHwRNvjAIfXfy39U7LbO9fio,1483264
|
|
10
|
+
selectolax/parser.pxd,sha256=4pM_CcZlvJlaR8EMjZCnSmnCcJbwcYOldRTBEbfwm48,25145
|
|
11
|
+
selectolax/parser.pyi,sha256=XItuYMW5pdpTbTFMI1FjH0JvBao9VTwbtfvnnrLn0Pk,11891
|
|
12
|
+
selectolax/parser.pyx,sha256=lQW4qJ6nCDraCupvcT61zUkgo-S-KIzl9JIGV6hh6hA,13386
|
|
13
|
+
selectolax/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
selectolax/utils.pxi,sha256=4rtdRcLWuemxN1qe7Eul5jvAmHZ65r7Gvf67_Wg8Bt4,3566
|
|
15
|
+
selectolax/lexbor/attrs.pxi,sha256=r9DroDAkoxIvSMiDTRKpfYp503b7yUteDoYwglhQ0FM,3241
|
|
16
|
+
selectolax/lexbor/node.pxi,sha256=g5R3gZw-Xa7y8TkupE4mAyaorcdDArl5DeaKBBU35jA,30207
|
|
17
|
+
selectolax/lexbor/selection.pxi,sha256=DVtVnaCwzXPPkDqgW0vEtkQa1zWJ0c2Ud3KGSrvK5PM,6755
|
|
18
|
+
selectolax/lexbor/util.pxi,sha256=0I4ElWIwXxrZCfMmGCtyDU127oMsPCqC3IcUk4QmMAc,582
|
|
19
|
+
selectolax/modest/node.pxi,sha256=xDJTFhcvkF7FGSObnCftZJSIBj7wV1--IdLJbFoIItw,33519
|
|
20
|
+
selectolax/modest/selection.pxi,sha256=0elY7JwnpPVaw0QZE1T7A78s9FIph5uWIhwy4sEXGU8,6586
|
|
21
|
+
selectolax/modest/util.pxi,sha256=o2nPGGGtRlLqOCa7yPk94CfBzNlVr7ull7osFy6NRX4,570
|
|
22
|
+
selectolax-0.3.28.dist-info/LICENSE,sha256=A7Jb3WZcENcLfZRc7QPdm9zJdwfpIyPodPJu-kdMH6E,1087
|
|
23
|
+
selectolax-0.3.28.dist-info/METADATA,sha256=KFj4io2mGglBQQmipQ0zmc_yAmwXu8kDVav_YS3SBZc,6448
|
|
24
|
+
selectolax-0.3.28.dist-info/WHEEL,sha256=rLq6zy99NFadnn104_KE5z0qCJfRTCVsMafVXwuXNlE,97
|
|
25
|
+
selectolax-0.3.28.dist-info/top_level.txt,sha256=e5MuEM2PrQzoDlWetkFli9uXSlxa_ktW5jJEihhaI1c,11
|
|
26
|
+
selectolax-0.3.28.dist-info/RECORD,,
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
selectolax/__init__.py,sha256=H6D0G54OTy7vXxMudUXEbzIw-3rU9JcnyuRxJEv1L18,185
|
|
2
|
-
selectolax/base.pxi,sha256=zOj3BrCA71xd-mJFtkMIAglP4ZybfrHVoCoy6ljTBDQ,93
|
|
3
|
-
selectolax/lexbor.c,sha256=uXyEWGEy7YzKjk2IR48gYbrYKZeKKHPez854gjvsRRg,2354397
|
|
4
|
-
selectolax/lexbor.cp310-win32.pyd,sha256=yPi-82ZPVQgZy8jp39T_uoJd0gzoe4kdK81yR2lBwac,4544512
|
|
5
|
-
selectolax/lexbor.pxd,sha256=1d9nvZd9rZl27gwPwVV5BlbR2LAi6jDK69Xm9Guz5Kk,21538
|
|
6
|
-
selectolax/lexbor.pyi,sha256=DXQejzmWT7FbWCXcakLzOYGEs-rOMMdaLIZaNSu2uiM,6716
|
|
7
|
-
selectolax/lexbor.pyx,sha256=H3-Y78orz2Hop0Qqf8JulJo6f3yBR0kbHRqNPyDOsAc,11097
|
|
8
|
-
selectolax/parser.c,sha256=rGXXnE3kJJDElEps9cQMYaIfXCCxVpDk5ELR-RQF5nk,2215098
|
|
9
|
-
selectolax/parser.cp310-win32.pyd,sha256=gvTjI70NOq3JCm9r8jRb6KWMASvz13531urlCkV2FVc,1483776
|
|
10
|
-
selectolax/parser.pxd,sha256=4pM_CcZlvJlaR8EMjZCnSmnCcJbwcYOldRTBEbfwm48,25145
|
|
11
|
-
selectolax/parser.pyi,sha256=Ud_hBY54PJEVJX6WZ07L7s0uzs3u1FLD7TAGhES1y7Q,11887
|
|
12
|
-
selectolax/parser.pyx,sha256=lQW4qJ6nCDraCupvcT61zUkgo-S-KIzl9JIGV6hh6hA,13386
|
|
13
|
-
selectolax/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
selectolax/utils.pxi,sha256=4rtdRcLWuemxN1qe7Eul5jvAmHZ65r7Gvf67_Wg8Bt4,3566
|
|
15
|
-
selectolax/lexbor/attrs.pxi,sha256=TEJUCGAkFwb14Emecyx4yljKSJMRmFbq8mOcNs35G_c,3204
|
|
16
|
-
selectolax/lexbor/node.pxi,sha256=P-KXzAk6fOo8ilEKAm0yjFQa90xkAXhWhSdce-YDauo,30213
|
|
17
|
-
selectolax/lexbor/selection.pxi,sha256=nRGiDYvpSAQcsWQ_2Z9-4kqebahIJmKWXQBtd3MPsis,6626
|
|
18
|
-
selectolax/lexbor/util.pxi,sha256=0I4ElWIwXxrZCfMmGCtyDU127oMsPCqC3IcUk4QmMAc,582
|
|
19
|
-
selectolax/modest/node.pxi,sha256=xDJTFhcvkF7FGSObnCftZJSIBj7wV1--IdLJbFoIItw,33519
|
|
20
|
-
selectolax/modest/selection.pxi,sha256=0elY7JwnpPVaw0QZE1T7A78s9FIph5uWIhwy4sEXGU8,6586
|
|
21
|
-
selectolax/modest/util.pxi,sha256=o2nPGGGtRlLqOCa7yPk94CfBzNlVr7ull7osFy6NRX4,570
|
|
22
|
-
selectolax-0.3.27.dist-info/LICENSE,sha256=Gy4WGsmAwV9QtqH0HaBHJQ35bt_0irn77fIt1iBncUo,1087
|
|
23
|
-
selectolax-0.3.27.dist-info/METADATA,sha256=g5nfZhPsJ3nCoIEH4W-fnujzcB2-SchMCeC0U1oPSXw,6105
|
|
24
|
-
selectolax-0.3.27.dist-info/WHEEL,sha256=IJJUxdZyjrGcLR3XjvKOCbzRR0h6oB7KSRhSaDzEI7U,97
|
|
25
|
-
selectolax-0.3.27.dist-info/top_level.txt,sha256=e5MuEM2PrQzoDlWetkFli9uXSlxa_ktW5jJEihhaI1c,11
|
|
26
|
-
selectolax-0.3.27.dist-info/RECORD,,
|
|
File without changes
|