selectolax 0.3.27__cp38-cp38-win32.whl → 0.3.28__cp38-cp38-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.

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 attribute_long_than(
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 any_attribute_long_than(
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-2023, Artem Golubin
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
1
  Metadata-Version: 2.1
2
2
  Name: selectolax
3
- Version: 0.3.27
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
@@ -75,6 +75,10 @@ How to compile selectolax while developing:
75
75
  Basic examples
76
76
  --------------
77
77
 
78
+ Here are some basic examples to get you started with selectolax:
79
+
80
+ Parsing HTML and extracting text:
81
+
78
82
  .. code:: python
79
83
 
80
84
  In [1]: from selectolax.parser import HTMLParser
@@ -97,6 +101,8 @@ Basic examples
97
101
  ['Lorem Ipsum is simply dummy text of the printing and typesetting industry. ',
98
102
  'Lorem ipsum dolor sit amet, consectetur adipiscing elit.']
99
103
 
104
+ Using advanced CSS selectors:
105
+
100
106
  .. code:: python
101
107
 
102
108
  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.cp38-win32.pyd,sha256=fwluPv07EUkNEr9rwrLH-rcZnNYuKo5C30kUvvfXvnc,2645504
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.cp38-win32.pyd,sha256=V5HNwCdSB3jIFw3EMTOTPx_6pe9dBSmfG8th3Ypgc6I,1484288
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=Fe1JHX7ZNFF5KUaEhd27XnIogIbO49o5rDJFMqTfSr4,6243
24
+ selectolax-0.3.28.dist-info/WHEEL,sha256=vBXc8Yz61rk4PXr558q4bsp34y-RMVJ3b9QU_ECAK-o,95
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.cp38-win32.pyd,sha256=AAE5KeBWINSKteSYfR1x7MmoZwU5WhWZGCbtLLZBrFE,4547584
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.cp38-win32.pyd,sha256=DsoATONETf6FdGczYINflgjX2EVkc2Omy_M3cAZb0N4,1484800
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=vBXc8Yz61rk4PXr558q4bsp34y-RMVJ3b9QU_ECAK-o,95
25
- selectolax-0.3.27.dist-info/top_level.txt,sha256=e5MuEM2PrQzoDlWetkFli9uXSlxa_ktW5jJEihhaI1c,11
26
- selectolax-0.3.27.dist-info/RECORD,,