brewdoc-linux-x64-glibc 0.0.0-stage → 0.3.2

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.
Files changed (576) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +128 -2
  3. package/binary/_internal/PIL/_avif.cpython-312-x86_64-linux-gnu.so +0 -0
  4. package/binary/_internal/PIL/_imaging.cpython-312-x86_64-linux-gnu.so +0 -0
  5. package/binary/_internal/PIL/_imagingcms.cpython-312-x86_64-linux-gnu.so +0 -0
  6. package/binary/_internal/PIL/_imagingft.cpython-312-x86_64-linux-gnu.so +0 -0
  7. package/binary/_internal/PIL/_imagingmath.cpython-312-x86_64-linux-gnu.so +0 -0
  8. package/binary/_internal/PIL/_imagingtk.cpython-312-x86_64-linux-gnu.so +0 -0
  9. package/binary/_internal/PIL/_webp.cpython-312-x86_64-linux-gnu.so +0 -0
  10. package/binary/_internal/_cffi_backend.cpython-312-x86_64-linux-gnu.so +0 -0
  11. package/binary/_internal/_quickjs.abi3.so +0 -0
  12. package/binary/_internal/base_library.zip +0 -0
  13. package/binary/_internal/brewdoc/_urljs/glue.js +858 -0
  14. package/binary/_internal/brewdoc/_vendor/THIRD_PARTY_NOTICES.txt +342 -0
  15. package/binary/_internal/brewdoc/_vendor/linkedom-worker.js +12650 -0
  16. package/binary/_internal/brewdoc-0.3.2.dist-info/INSTALLER +1 -0
  17. package/binary/_internal/brewdoc-0.3.2.dist-info/METADATA +157 -0
  18. package/binary/_internal/brewdoc-0.3.2.dist-info/RECORD +30 -0
  19. package/binary/_internal/brewdoc-0.3.2.dist-info/REQUESTED +0 -0
  20. package/binary/_internal/brewdoc-0.3.2.dist-info/WHEEL +4 -0
  21. package/binary/_internal/brewdoc-0.3.2.dist-info/direct_url.json +1 -0
  22. package/binary/_internal/brewdoc-0.3.2.dist-info/entry_points.txt +2 -0
  23. package/binary/_internal/brewdoc-0.3.2.dist-info/licenses/LICENSE +21 -0
  24. package/binary/_internal/brewdoc-0.3.2.dist-info/uv_cache.json +1 -0
  25. package/binary/_internal/cffi-2.1.1.dist-info/INSTALLER +1 -0
  26. package/binary/_internal/cffi-2.1.1.dist-info/METADATA +67 -0
  27. package/binary/_internal/cffi-2.1.1.dist-info/RECORD +34 -0
  28. package/binary/_internal/cffi-2.1.1.dist-info/REQUESTED +0 -0
  29. package/binary/_internal/cffi-2.1.1.dist-info/WHEEL +6 -0
  30. package/binary/_internal/cffi-2.1.1.dist-info/entry_points.txt +5 -0
  31. package/binary/_internal/cffi-2.1.1.dist-info/licenses/LICENSE +23 -0
  32. package/binary/_internal/cffi-2.1.1.dist-info/top_level.txt +2 -0
  33. package/binary/_internal/charset_normalizer/cd.cpython-312-x86_64-linux-gnu.so +0 -0
  34. package/binary/_internal/charset_normalizer/md.cpython-312-x86_64-linux-gnu.so +0 -0
  35. package/binary/_internal/charset_normalizer-3.5.2.dist-info/INSTALLER +1 -0
  36. package/binary/_internal/charset_normalizer-3.5.2.dist-info/METADATA +892 -0
  37. package/binary/_internal/charset_normalizer-3.5.2.dist-info/RECORD +24 -0
  38. package/binary/_internal/charset_normalizer-3.5.2.dist-info/REQUESTED +0 -0
  39. package/binary/_internal/charset_normalizer-3.5.2.dist-info/WHEEL +7 -0
  40. package/binary/_internal/charset_normalizer-3.5.2.dist-info/entry_points.txt +2 -0
  41. package/binary/_internal/charset_normalizer-3.5.2.dist-info/licenses/LICENSE +21 -0
  42. package/binary/_internal/charset_normalizer-3.5.2.dist-info/top_level.txt +1 -0
  43. package/binary/_internal/cryptography/hazmat/bindings/_rust.abi3.so +0 -0
  44. package/binary/_internal/cryptography-50.0.2.dist-info/INSTALLER +1 -0
  45. package/binary/_internal/cryptography-50.0.2.dist-info/METADATA +111 -0
  46. package/binary/_internal/cryptography-50.0.2.dist-info/RECORD +122 -0
  47. package/binary/_internal/cryptography-50.0.2.dist-info/REQUESTED +0 -0
  48. package/binary/_internal/cryptography-50.0.2.dist-info/WHEEL +5 -0
  49. package/binary/_internal/cryptography-50.0.2.dist-info/licenses/LICENSE +3 -0
  50. package/binary/_internal/cryptography-50.0.2.dist-info/licenses/LICENSE.APACHE +202 -0
  51. package/binary/_internal/cryptography-50.0.2.dist-info/licenses/LICENSE.BSD +27 -0
  52. package/binary/_internal/cryptography-50.0.2.dist-info/sboms/cryptography-rust.cyclonedx.json +1365 -0
  53. package/binary/_internal/cryptography-50.0.2.dist-info/sboms/sbom.json +43 -0
  54. package/binary/_internal/libXau-154567c4.so.6.0.0 +0 -0
  55. package/binary/_internal/libavif-8a7f9d56.so.16.4.2 +0 -0
  56. package/binary/_internal/libbrotlicommon-53534446.so.1.2.0 +0 -0
  57. package/binary/_internal/libbrotlidec-7e5462ba.so.1.2.0 +0 -0
  58. package/binary/_internal/libfreetype-9fc94c80.so.6.20.6 +0 -0
  59. package/binary/_internal/libgcc_s.so.1 +0 -0
  60. package/binary/_internal/libharfbuzz-172d1f63.so.0.61421.0 +0 -0
  61. package/binary/_internal/libjpeg-31e2ca52.so.62.4.0 +0 -0
  62. package/binary/_internal/liblcms2-dade1fbf.so.2.0.19 +0 -0
  63. package/binary/_internal/liblzma-2be87c3e.so.5.8.3 +0 -0
  64. package/binary/_internal/libopenjp2-b07f72ad.so.2.5.4 +0 -0
  65. package/binary/_internal/libpng16-abb096d5.so.16.58.0 +0 -0
  66. package/binary/_internal/libpython3.12.so.1.0 +0 -0
  67. package/binary/_internal/libsharpyuv-0066295b.so.0.1.2 +0 -0
  68. package/binary/_internal/libstdc++.so.6 +0 -0
  69. package/binary/_internal/libtiff-fc87e79d.so.6.2.0 +0 -0
  70. package/binary/_internal/libwebp-51b0b3f7.so.7.2.0 +0 -0
  71. package/binary/_internal/libwebpdemux-9fe2abcc.so.2.0.17 +0 -0
  72. package/binary/_internal/libwebpmux-8fb1c9f6.so.3.1.2 +0 -0
  73. package/binary/_internal/libxcb-ad31f5a3.so.1.1.0 +0 -0
  74. package/binary/_internal/libz.so.1 +0 -0
  75. package/binary/_internal/libzstd-44be1190.so.1.5.7 +0 -0
  76. package/binary/_internal/pdfminer/cmap/78-EUC-H.json.gz +0 -0
  77. package/binary/_internal/pdfminer/cmap/78-EUC-V.json.gz +0 -0
  78. package/binary/_internal/pdfminer/cmap/78-H.json.gz +0 -0
  79. package/binary/_internal/pdfminer/cmap/78-RKSJ-H.json.gz +0 -0
  80. package/binary/_internal/pdfminer/cmap/78-RKSJ-V.json.gz +0 -0
  81. package/binary/_internal/pdfminer/cmap/78-V.json.gz +0 -0
  82. package/binary/_internal/pdfminer/cmap/78ms-RKSJ-H.json.gz +0 -0
  83. package/binary/_internal/pdfminer/cmap/78ms-RKSJ-V.json.gz +0 -0
  84. package/binary/_internal/pdfminer/cmap/83pv-RKSJ-H.json.gz +0 -0
  85. package/binary/_internal/pdfminer/cmap/83pv-RKSJ-V.json.gz +0 -0
  86. package/binary/_internal/pdfminer/cmap/90ms-RKSJ-H.json.gz +0 -0
  87. package/binary/_internal/pdfminer/cmap/90ms-RKSJ-V.json.gz +0 -0
  88. package/binary/_internal/pdfminer/cmap/90msp-RKSJ-H.json.gz +0 -0
  89. package/binary/_internal/pdfminer/cmap/90msp-RKSJ-V.json.gz +0 -0
  90. package/binary/_internal/pdfminer/cmap/90pv-RKSJ-H.json.gz +0 -0
  91. package/binary/_internal/pdfminer/cmap/90pv-RKSJ-V.json.gz +0 -0
  92. package/binary/_internal/pdfminer/cmap/Add-H.json.gz +0 -0
  93. package/binary/_internal/pdfminer/cmap/Add-RKSJ-H.json.gz +0 -0
  94. package/binary/_internal/pdfminer/cmap/Add-RKSJ-V.json.gz +0 -0
  95. package/binary/_internal/pdfminer/cmap/Add-V.json.gz +0 -0
  96. package/binary/_internal/pdfminer/cmap/B5-H.json.gz +0 -0
  97. package/binary/_internal/pdfminer/cmap/B5-V.json.gz +0 -0
  98. package/binary/_internal/pdfminer/cmap/B5pc-H.json.gz +0 -0
  99. package/binary/_internal/pdfminer/cmap/B5pc-V.json.gz +0 -0
  100. package/binary/_internal/pdfminer/cmap/CNS-EUC-H.json.gz +0 -0
  101. package/binary/_internal/pdfminer/cmap/CNS-EUC-V.json.gz +0 -0
  102. package/binary/_internal/pdfminer/cmap/CNS1-H.json.gz +0 -0
  103. package/binary/_internal/pdfminer/cmap/CNS1-V.json.gz +0 -0
  104. package/binary/_internal/pdfminer/cmap/CNS2-H.json.gz +0 -0
  105. package/binary/_internal/pdfminer/cmap/CNS2-V.json.gz +0 -0
  106. package/binary/_internal/pdfminer/cmap/ETHK-B5-H.json.gz +0 -0
  107. package/binary/_internal/pdfminer/cmap/ETHK-B5-V.json.gz +0 -0
  108. package/binary/_internal/pdfminer/cmap/ETen-B5-H.json.gz +0 -0
  109. package/binary/_internal/pdfminer/cmap/ETen-B5-V.json.gz +0 -0
  110. package/binary/_internal/pdfminer/cmap/ETenms-B5-H.json.gz +0 -0
  111. package/binary/_internal/pdfminer/cmap/ETenms-B5-V.json.gz +0 -0
  112. package/binary/_internal/pdfminer/cmap/EUC-H.json.gz +0 -0
  113. package/binary/_internal/pdfminer/cmap/EUC-V.json.gz +0 -0
  114. package/binary/_internal/pdfminer/cmap/Ext-H.json.gz +0 -0
  115. package/binary/_internal/pdfminer/cmap/Ext-RKSJ-H.json.gz +0 -0
  116. package/binary/_internal/pdfminer/cmap/Ext-RKSJ-V.json.gz +0 -0
  117. package/binary/_internal/pdfminer/cmap/Ext-V.json.gz +0 -0
  118. package/binary/_internal/pdfminer/cmap/GB-EUC-H.json.gz +0 -0
  119. package/binary/_internal/pdfminer/cmap/GB-EUC-V.json.gz +0 -0
  120. package/binary/_internal/pdfminer/cmap/GB-H.json.gz +0 -0
  121. package/binary/_internal/pdfminer/cmap/GB-V.json.gz +0 -0
  122. package/binary/_internal/pdfminer/cmap/GBK-EUC-H.json.gz +0 -0
  123. package/binary/_internal/pdfminer/cmap/GBK-EUC-V.json.gz +0 -0
  124. package/binary/_internal/pdfminer/cmap/GBK2K-H.json.gz +0 -0
  125. package/binary/_internal/pdfminer/cmap/GBK2K-V.json.gz +0 -0
  126. package/binary/_internal/pdfminer/cmap/GBKp-EUC-H.json.gz +0 -0
  127. package/binary/_internal/pdfminer/cmap/GBKp-EUC-V.json.gz +0 -0
  128. package/binary/_internal/pdfminer/cmap/GBT-EUC-H.json.gz +0 -0
  129. package/binary/_internal/pdfminer/cmap/GBT-EUC-V.json.gz +0 -0
  130. package/binary/_internal/pdfminer/cmap/GBT-H.json.gz +0 -0
  131. package/binary/_internal/pdfminer/cmap/GBT-V.json.gz +0 -0
  132. package/binary/_internal/pdfminer/cmap/GBTpc-EUC-H.json.gz +0 -0
  133. package/binary/_internal/pdfminer/cmap/GBTpc-EUC-V.json.gz +0 -0
  134. package/binary/_internal/pdfminer/cmap/GBpc-EUC-H.json.gz +0 -0
  135. package/binary/_internal/pdfminer/cmap/GBpc-EUC-V.json.gz +0 -0
  136. package/binary/_internal/pdfminer/cmap/H.json.gz +0 -0
  137. package/binary/_internal/pdfminer/cmap/HKdla-B5-H.json.gz +0 -0
  138. package/binary/_internal/pdfminer/cmap/HKdla-B5-V.json.gz +0 -0
  139. package/binary/_internal/pdfminer/cmap/HKdlb-B5-H.json.gz +0 -0
  140. package/binary/_internal/pdfminer/cmap/HKdlb-B5-V.json.gz +0 -0
  141. package/binary/_internal/pdfminer/cmap/HKgccs-B5-H.json.gz +0 -0
  142. package/binary/_internal/pdfminer/cmap/HKgccs-B5-V.json.gz +0 -0
  143. package/binary/_internal/pdfminer/cmap/HKm314-B5-H.json.gz +0 -0
  144. package/binary/_internal/pdfminer/cmap/HKm314-B5-V.json.gz +0 -0
  145. package/binary/_internal/pdfminer/cmap/HKm471-B5-H.json.gz +0 -0
  146. package/binary/_internal/pdfminer/cmap/HKm471-B5-V.json.gz +0 -0
  147. package/binary/_internal/pdfminer/cmap/HKscs-B5-H.json.gz +0 -0
  148. package/binary/_internal/pdfminer/cmap/HKscs-B5-V.json.gz +0 -0
  149. package/binary/_internal/pdfminer/cmap/Hankaku-H.json.gz +0 -0
  150. package/binary/_internal/pdfminer/cmap/Hankaku-V.json.gz +0 -0
  151. package/binary/_internal/pdfminer/cmap/Hiragana-H.json.gz +0 -0
  152. package/binary/_internal/pdfminer/cmap/Hiragana-V.json.gz +0 -0
  153. package/binary/_internal/pdfminer/cmap/KSC-EUC-H.json.gz +0 -0
  154. package/binary/_internal/pdfminer/cmap/KSC-EUC-V.json.gz +0 -0
  155. package/binary/_internal/pdfminer/cmap/KSC-H.json.gz +0 -0
  156. package/binary/_internal/pdfminer/cmap/KSC-Johab-H.json.gz +0 -0
  157. package/binary/_internal/pdfminer/cmap/KSC-Johab-V.json.gz +0 -0
  158. package/binary/_internal/pdfminer/cmap/KSC-V.json.gz +0 -0
  159. package/binary/_internal/pdfminer/cmap/KSCms-UHC-H.json.gz +0 -0
  160. package/binary/_internal/pdfminer/cmap/KSCms-UHC-HW-H.json.gz +0 -0
  161. package/binary/_internal/pdfminer/cmap/KSCms-UHC-HW-V.json.gz +0 -0
  162. package/binary/_internal/pdfminer/cmap/KSCms-UHC-V.json.gz +0 -0
  163. package/binary/_internal/pdfminer/cmap/KSCpc-EUC-H.json.gz +0 -0
  164. package/binary/_internal/pdfminer/cmap/KSCpc-EUC-V.json.gz +0 -0
  165. package/binary/_internal/pdfminer/cmap/Katakana-H.json.gz +0 -0
  166. package/binary/_internal/pdfminer/cmap/Katakana-V.json.gz +0 -0
  167. package/binary/_internal/pdfminer/cmap/NWP-H.json.gz +0 -0
  168. package/binary/_internal/pdfminer/cmap/NWP-V.json.gz +0 -0
  169. package/binary/_internal/pdfminer/cmap/README.txt +79 -0
  170. package/binary/_internal/pdfminer/cmap/RKSJ-H.json.gz +0 -0
  171. package/binary/_internal/pdfminer/cmap/RKSJ-V.json.gz +0 -0
  172. package/binary/_internal/pdfminer/cmap/Roman-H.json.gz +0 -0
  173. package/binary/_internal/pdfminer/cmap/Roman-V.json.gz +0 -0
  174. package/binary/_internal/pdfminer/cmap/UniCNS-UCS2-H.json.gz +0 -0
  175. package/binary/_internal/pdfminer/cmap/UniCNS-UCS2-V.json.gz +0 -0
  176. package/binary/_internal/pdfminer/cmap/UniCNS-UTF16-H.json.gz +0 -0
  177. package/binary/_internal/pdfminer/cmap/UniCNS-UTF16-V.json.gz +0 -0
  178. package/binary/_internal/pdfminer/cmap/UniCNS-UTF32-H.json.gz +0 -0
  179. package/binary/_internal/pdfminer/cmap/UniCNS-UTF32-V.json.gz +0 -0
  180. package/binary/_internal/pdfminer/cmap/UniCNS-UTF8-H.json.gz +0 -0
  181. package/binary/_internal/pdfminer/cmap/UniCNS-UTF8-V.json.gz +0 -0
  182. package/binary/_internal/pdfminer/cmap/UniGB-UCS2-H.json.gz +0 -0
  183. package/binary/_internal/pdfminer/cmap/UniGB-UCS2-V.json.gz +0 -0
  184. package/binary/_internal/pdfminer/cmap/UniGB-UTF16-H.json.gz +0 -0
  185. package/binary/_internal/pdfminer/cmap/UniGB-UTF16-V.json.gz +0 -0
  186. package/binary/_internal/pdfminer/cmap/UniGB-UTF32-H.json.gz +0 -0
  187. package/binary/_internal/pdfminer/cmap/UniGB-UTF32-V.json.gz +0 -0
  188. package/binary/_internal/pdfminer/cmap/UniGB-UTF8-H.json.gz +0 -0
  189. package/binary/_internal/pdfminer/cmap/UniGB-UTF8-V.json.gz +0 -0
  190. package/binary/_internal/pdfminer/cmap/UniJIS-UCS2-H.json.gz +0 -0
  191. package/binary/_internal/pdfminer/cmap/UniJIS-UCS2-HW-H.json.gz +0 -0
  192. package/binary/_internal/pdfminer/cmap/UniJIS-UCS2-HW-V.json.gz +0 -0
  193. package/binary/_internal/pdfminer/cmap/UniJIS-UCS2-V.json.gz +0 -0
  194. package/binary/_internal/pdfminer/cmap/UniJIS-UTF16-H.json.gz +0 -0
  195. package/binary/_internal/pdfminer/cmap/UniJIS-UTF16-V.json.gz +0 -0
  196. package/binary/_internal/pdfminer/cmap/UniJIS-UTF32-H.json.gz +0 -0
  197. package/binary/_internal/pdfminer/cmap/UniJIS-UTF32-V.json.gz +0 -0
  198. package/binary/_internal/pdfminer/cmap/UniJIS-UTF8-H.json.gz +0 -0
  199. package/binary/_internal/pdfminer/cmap/UniJIS-UTF8-V.json.gz +0 -0
  200. package/binary/_internal/pdfminer/cmap/UniJIS2004-UTF16-H.json.gz +0 -0
  201. package/binary/_internal/pdfminer/cmap/UniJIS2004-UTF16-V.json.gz +0 -0
  202. package/binary/_internal/pdfminer/cmap/UniJIS2004-UTF32-H.json.gz +0 -0
  203. package/binary/_internal/pdfminer/cmap/UniJIS2004-UTF32-V.json.gz +0 -0
  204. package/binary/_internal/pdfminer/cmap/UniJIS2004-UTF8-H.json.gz +0 -0
  205. package/binary/_internal/pdfminer/cmap/UniJIS2004-UTF8-V.json.gz +0 -0
  206. package/binary/_internal/pdfminer/cmap/UniJISX0213-UTF32-H.json.gz +0 -0
  207. package/binary/_internal/pdfminer/cmap/UniJISX0213-UTF32-V.json.gz +0 -0
  208. package/binary/_internal/pdfminer/cmap/UniJISX02132004-UTF32-H.json.gz +0 -0
  209. package/binary/_internal/pdfminer/cmap/UniJISX02132004-UTF32-V.json.gz +0 -0
  210. package/binary/_internal/pdfminer/cmap/UniKS-UCS2-H.json.gz +0 -0
  211. package/binary/_internal/pdfminer/cmap/UniKS-UCS2-V.json.gz +0 -0
  212. package/binary/_internal/pdfminer/cmap/UniKS-UTF16-H.json.gz +0 -0
  213. package/binary/_internal/pdfminer/cmap/UniKS-UTF16-V.json.gz +0 -0
  214. package/binary/_internal/pdfminer/cmap/UniKS-UTF32-H.json.gz +0 -0
  215. package/binary/_internal/pdfminer/cmap/UniKS-UTF32-V.json.gz +0 -0
  216. package/binary/_internal/pdfminer/cmap/UniKS-UTF8-H.json.gz +0 -0
  217. package/binary/_internal/pdfminer/cmap/UniKS-UTF8-V.json.gz +0 -0
  218. package/binary/_internal/pdfminer/cmap/V.json.gz +0 -0
  219. package/binary/_internal/pdfminer/cmap/WP-Symbol-H.json.gz +0 -0
  220. package/binary/_internal/pdfminer/cmap/WP-Symbol-V.json.gz +0 -0
  221. package/binary/_internal/pdfminer/cmap/to-unicode-Adobe-CNS1.json.gz +0 -0
  222. package/binary/_internal/pdfminer/cmap/to-unicode-Adobe-GB1.json.gz +0 -0
  223. package/binary/_internal/pdfminer/cmap/to-unicode-Adobe-Japan1.json.gz +0 -0
  224. package/binary/_internal/pdfminer/cmap/to-unicode-Adobe-Korea1.json.gz +0 -0
  225. package/binary/_internal/pdfminer/py.typed +0 -0
  226. package/binary/_internal/pdfminer_six-20260107.dist-info/INSTALLER +1 -0
  227. package/binary/_internal/pdfminer_six-20260107.dist-info/METADATA +110 -0
  228. package/binary/_internal/pdfminer_six-20260107.dist-info/RECORD +191 -0
  229. package/binary/_internal/pdfminer_six-20260107.dist-info/REQUESTED +0 -0
  230. package/binary/_internal/pdfminer_six-20260107.dist-info/WHEEL +5 -0
  231. package/binary/_internal/pdfminer_six-20260107.dist-info/licenses/LICENSE +22 -0
  232. package/binary/_internal/pdfminer_six-20260107.dist-info/top_level.txt +1 -0
  233. package/binary/_internal/pdfplumber-0.11.10.dist-info/INSTALLER +1 -0
  234. package/binary/_internal/pdfplumber-0.11.10.dist-info/METADATA +617 -0
  235. package/binary/_internal/pdfplumber-0.11.10.dist-info/RECORD +30 -0
  236. package/binary/_internal/pdfplumber-0.11.10.dist-info/REQUESTED +0 -0
  237. package/binary/_internal/pdfplumber-0.11.10.dist-info/WHEEL +5 -0
  238. package/binary/_internal/pdfplumber-0.11.10.dist-info/entry_points.txt +2 -0
  239. package/binary/_internal/pdfplumber-0.11.10.dist-info/licenses/LICENSE.txt +21 -0
  240. package/binary/_internal/pdfplumber-0.11.10.dist-info/top_level.txt +1 -0
  241. package/binary/_internal/pillow-12.3.0.dist-info/INSTALLER +1 -0
  242. package/binary/_internal/pillow-12.3.0.dist-info/METADATA +180 -0
  243. package/binary/_internal/pillow-12.3.0.dist-info/RECORD +142 -0
  244. package/binary/_internal/pillow-12.3.0.dist-info/REQUESTED +0 -0
  245. package/binary/_internal/pillow-12.3.0.dist-info/WHEEL +6 -0
  246. package/binary/_internal/pillow-12.3.0.dist-info/licenses/LICENSE +1574 -0
  247. package/binary/_internal/pillow-12.3.0.dist-info/sboms/auditwheel.cdx.json +1 -0
  248. package/binary/_internal/pillow-12.3.0.dist-info/sboms/pillow-12.3.0.cdx.json +721 -0
  249. package/binary/_internal/pillow-12.3.0.dist-info/top_level.txt +1 -0
  250. package/binary/_internal/pillow-12.3.0.dist-info/zip-safe +1 -0
  251. package/binary/_internal/pillow.libs/libXau-154567c4.so.6.0.0 +0 -0
  252. package/binary/_internal/pillow.libs/libavif-8a7f9d56.so.16.4.2 +0 -0
  253. package/binary/_internal/pillow.libs/libbrotlicommon-53534446.so.1.2.0 +0 -0
  254. package/binary/_internal/pillow.libs/libbrotlidec-7e5462ba.so.1.2.0 +0 -0
  255. package/binary/_internal/pillow.libs/libfreetype-9fc94c80.so.6.20.6 +0 -0
  256. package/binary/_internal/pillow.libs/libharfbuzz-172d1f63.so.0.61421.0 +0 -0
  257. package/binary/_internal/pillow.libs/libjpeg-31e2ca52.so.62.4.0 +0 -0
  258. package/binary/_internal/pillow.libs/liblcms2-dade1fbf.so.2.0.19 +0 -0
  259. package/binary/_internal/pillow.libs/liblzma-2be87c3e.so.5.8.3 +0 -0
  260. package/binary/_internal/pillow.libs/libopenjp2-b07f72ad.so.2.5.4 +0 -0
  261. package/binary/_internal/pillow.libs/libpng16-abb096d5.so.16.58.0 +0 -0
  262. package/binary/_internal/pillow.libs/libsharpyuv-0066295b.so.0.1.2 +0 -0
  263. package/binary/_internal/pillow.libs/libtiff-fc87e79d.so.6.2.0 +0 -0
  264. package/binary/_internal/pillow.libs/libwebp-51b0b3f7.so.7.2.0 +0 -0
  265. package/binary/_internal/pillow.libs/libwebpdemux-9fe2abcc.so.2.0.17 +0 -0
  266. package/binary/_internal/pillow.libs/libwebpmux-8fb1c9f6.so.3.1.2 +0 -0
  267. package/binary/_internal/pillow.libs/libxcb-ad31f5a3.so.1.1.0 +0 -0
  268. package/binary/_internal/pillow.libs/libzstd-44be1190.so.1.5.7 +0 -0
  269. package/binary/_internal/pycparser-3.0.dist-info/INSTALLER +1 -0
  270. package/binary/_internal/pycparser-3.0.dist-info/METADATA +244 -0
  271. package/binary/_internal/pycparser-3.0.dist-info/RECORD +15 -0
  272. package/binary/_internal/pycparser-3.0.dist-info/REQUESTED +0 -0
  273. package/binary/_internal/pycparser-3.0.dist-info/WHEEL +5 -0
  274. package/binary/_internal/pycparser-3.0.dist-info/licenses/LICENSE +27 -0
  275. package/binary/_internal/pycparser-3.0.dist-info/top_level.txt +1 -0
  276. package/binary/_internal/pypdfium2/version.json +11 -0
  277. package/binary/_internal/pypdfium2-5.13.0.dist-info/INSTALLER +1 -0
  278. package/binary/_internal/pypdfium2-5.13.0.dist-info/METADATA +1139 -0
  279. package/binary/_internal/pypdfium2-5.13.0.dist-info/RECORD +75 -0
  280. package/binary/_internal/pypdfium2-5.13.0.dist-info/REQUESTED +0 -0
  281. package/binary/_internal/pypdfium2-5.13.0.dist-info/WHEEL +6 -0
  282. package/binary/_internal/pypdfium2-5.13.0.dist-info/entry_points.txt +2 -0
  283. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/LICENSES/Apache-2.0.txt +202 -0
  284. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/LICENSES/BSD-3-Clause.txt +26 -0
  285. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/LICENSES/CC-BY-4.0.txt +317 -0
  286. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/abseil.txt +203 -0
  287. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/agg23.txt +14 -0
  288. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/fast_float.txt +27 -0
  289. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/freetype.txt +169 -0
  290. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/icu.txt +568 -0
  291. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/lcms.txt +27 -0
  292. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/libjpeg_turbo.ijg +260 -0
  293. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/libjpeg_turbo.md +135 -0
  294. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/libopenjpeg.txt +32 -0
  295. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/libpng.txt +134 -0
  296. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/libtiff.txt +21 -0
  297. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/llvm-libc.txt +278 -0
  298. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/pdfium-binaries.txt +9 -0
  299. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/pdfium.txt +230 -0
  300. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/simdutf.txt +18 -0
  301. package/binary/_internal/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/zlib.txt +29 -0
  302. package/binary/_internal/pypdfium2-5.13.0.dist-info/top_level.txt +4 -0
  303. package/binary/_internal/pypdfium2_raw/libpdfium.so +0 -0
  304. package/binary/_internal/pypdfium2_raw/version.json +10 -0
  305. package/binary/_internal/python_calamine/_python_calamine.cpython-312-x86_64-linux-gnu.so +0 -0
  306. package/binary/_internal/python_calamine-0.8.2.dist-info/INSTALLER +1 -0
  307. package/binary/_internal/python_calamine-0.8.2.dist-info/METADATA +94 -0
  308. package/binary/_internal/python_calamine-0.8.2.dist-info/RECORD +11 -0
  309. package/binary/_internal/python_calamine-0.8.2.dist-info/REQUESTED +0 -0
  310. package/binary/_internal/python_calamine-0.8.2.dist-info/WHEEL +5 -0
  311. package/binary/_internal/python_calamine-0.8.2.dist-info/licenses/LICENSE +21 -0
  312. package/binary/_internal/python_calamine-0.8.2.dist-info/sboms/python-calamine.cyclonedx.json +1615 -0
  313. package/binary/_internal/quickjs_ng-0.17.0.1.dist-info/INSTALLER +1 -0
  314. package/binary/_internal/quickjs_ng-0.17.0.1.dist-info/METADATA +161 -0
  315. package/binary/_internal/quickjs_ng-0.17.0.1.dist-info/RECORD +9 -0
  316. package/binary/_internal/quickjs_ng-0.17.0.1.dist-info/REQUESTED +0 -0
  317. package/binary/_internal/quickjs_ng-0.17.0.1.dist-info/WHEEL +7 -0
  318. package/binary/_internal/quickjs_ng-0.17.0.1.dist-info/licenses/LICENSE +21 -0
  319. package/binary/_internal/quickjs_ng-0.17.0.1.dist-info/top_level.txt +2 -0
  320. package/binary/_internal/selectolax/base.pxi +4 -0
  321. package/binary/_internal/selectolax/lexbor/attrs.pxi +123 -0
  322. package/binary/_internal/selectolax/lexbor/fragment_lookup.pxi +52 -0
  323. package/binary/_internal/selectolax/lexbor/node.pxi +1355 -0
  324. package/binary/_internal/selectolax/lexbor/node_remove.pxi +29 -0
  325. package/binary/_internal/selectolax/lexbor/selection.pxi +251 -0
  326. package/binary/_internal/selectolax/lexbor/util.pxi +114 -0
  327. package/binary/_internal/selectolax/lexbor.c +66981 -0
  328. package/binary/_internal/selectolax/lexbor.cpython-312-x86_64-linux-gnu.so +0 -0
  329. package/binary/_internal/selectolax/lexbor.pxd +682 -0
  330. package/binary/_internal/selectolax/lexbor.pyi +1534 -0
  331. package/binary/_internal/selectolax/lexbor.pyx +1046 -0
  332. package/binary/_internal/selectolax/modest/node.pxi +976 -0
  333. package/binary/_internal/selectolax/modest/selection.pxi +199 -0
  334. package/binary/_internal/selectolax/modest/util.pxi +20 -0
  335. package/binary/_internal/selectolax/py.typed +0 -0
  336. package/binary/_internal/selectolax/utils.pxi +117 -0
  337. package/binary/_internal/selectolax-0.4.13.dist-info/INSTALLER +1 -0
  338. package/binary/_internal/selectolax-0.4.13.dist-info/METADATA +222 -0
  339. package/binary/_internal/selectolax-0.4.13.dist-info/RECORD +30 -0
  340. package/binary/_internal/selectolax-0.4.13.dist-info/REQUESTED +0 -0
  341. package/binary/_internal/selectolax-0.4.13.dist-info/WHEEL +7 -0
  342. package/binary/_internal/selectolax-0.4.13.dist-info/licenses/LICENSE +10 -0
  343. package/binary/_internal/selectolax-0.4.13.dist-info/top_level.txt +1 -0
  344. package/binary/brewdoc +0 -0
  345. package/binary/licenses/installed/brewdoc/brewdoc/_vendor/THIRD_PARTY_NOTICES.txt +342 -0
  346. package/binary/licenses/installed/brewdoc/brewdoc-0.3.2.dist-info/licenses/LICENSE +21 -0
  347. package/binary/licenses/installed/cffi/cffi-2.1.1.dist-info/licenses/LICENSE +23 -0
  348. package/binary/licenses/installed/charset-normalizer/charset_normalizer-3.5.2.dist-info/licenses/LICENSE +21 -0
  349. package/binary/licenses/installed/cryptography/cryptography-50.0.2.dist-info/licenses/LICENSE +3 -0
  350. package/binary/licenses/installed/cryptography/cryptography-50.0.2.dist-info/licenses/LICENSE.APACHE +202 -0
  351. package/binary/licenses/installed/cryptography/cryptography-50.0.2.dist-info/licenses/LICENSE.BSD +27 -0
  352. package/binary/licenses/installed/interpreter/LICENSE.txt +279 -0
  353. package/binary/licenses/installed/native-runtime/GPL-3 +674 -0
  354. package/binary/licenses/installed/native-runtime/gcc-12-base-amd64-copyright +1512 -0
  355. package/binary/licenses/installed/pdfminer.six/pdfminer_six-20260107.dist-info/licenses/LICENSE +22 -0
  356. package/binary/licenses/installed/pdfplumber/pdfplumber-0.11.10.dist-info/licenses/LICENSE.txt +21 -0
  357. package/binary/licenses/installed/pillow/pillow-12.3.0.dist-info/licenses/LICENSE +1574 -0
  358. package/binary/licenses/installed/pycparser/pycparser-3.0.dist-info/licenses/LICENSE +27 -0
  359. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/LICENSES/Apache-2.0.txt +202 -0
  360. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/LICENSES/BSD-3-Clause.txt +26 -0
  361. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/LICENSES/CC-BY-4.0.txt +317 -0
  362. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/abseil.txt +203 -0
  363. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/agg23.txt +14 -0
  364. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/fast_float.txt +27 -0
  365. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/freetype.txt +169 -0
  366. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/icu.txt +568 -0
  367. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/lcms.txt +27 -0
  368. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/libjpeg_turbo.ijg +260 -0
  369. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/libjpeg_turbo.md +135 -0
  370. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/libopenjpeg.txt +32 -0
  371. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/libpng.txt +134 -0
  372. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/libtiff.txt +21 -0
  373. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/llvm-libc.txt +278 -0
  374. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/pdfium-binaries.txt +9 -0
  375. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/pdfium.txt +230 -0
  376. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/simdutf.txt +18 -0
  377. package/binary/licenses/installed/pypdfium2/pypdfium2-5.13.0.dist-info/licenses/data/linux_x64/BUILD_LICENSES/zlib.txt +29 -0
  378. package/binary/licenses/installed/python-calamine/python_calamine-0.8.2.dist-info/licenses/LICENSE +21 -0
  379. package/binary/licenses/installed/quickjs-ng/quickjs_ng-0.17.0.1.dist-info/licenses/LICENSE +21 -0
  380. package/binary/licenses/installed/runtime-hooks/pyi_rth_cryptography_openssl.py +20 -0
  381. package/binary/licenses/installed/runtime-hooks/pyi_rth_inspect.py +99 -0
  382. package/binary/licenses/installed/runtime-hooks/pyi_rth_multiprocessing.py +88 -0
  383. package/binary/licenses/installed/runtime-hooks/pyi_rth_pkgutil.py +64 -0
  384. package/binary/licenses/installed/selectolax/selectolax-0.4.13.dist-info/licenses/LICENSE +10 -0
  385. package/binary/licenses/installed-manifest.json +202 -0
  386. package/binary/licenses/supplemental/openssl/3.5.9/README-copyright.txt +9 -0
  387. package/binary/licenses/supplemental/openssl/4.0.3/README-copyright.txt +9 -0
  388. package/binary/licenses/supplemental/provenance.json +2347 -0
  389. package/binary/licenses/supplemental/pyinstaller-6.22.3/COPYING.txt +648 -0
  390. package/binary/licenses/supplemental/pyinstaller-6.22.3/bootloader/waflib/LICENSE +25 -0
  391. package/binary/licenses/supplemental/pyinstaller-6.22.3/bootloader/zlib/LICENSE +22 -0
  392. package/binary/licenses/supplemental/pyinstaller-6.22.3/doc/license.rst +24 -0
  393. package/binary/licenses/supplemental/pyinstaller-hooks-contrib-2026.8/LICENSE +521 -0
  394. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE +373 -0
  395. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.bdb.txt +126 -0
  396. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.bzip2.txt +37 -0
  397. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.cpython.txt +771 -0
  398. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.expat.txt +21 -0
  399. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.libX11.txt +942 -0
  400. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.libXau.txt +21 -0
  401. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.libedit.txt +29 -0
  402. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.libffi.txt +21 -0
  403. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.liblzma.txt +13 -0
  404. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.libuuid.txt +27 -0
  405. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.libxcb.txt +30 -0
  406. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.mpdecimal.txt +24 -0
  407. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.ncurses.txt +29 -0
  408. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.openssl-1.1.txt +124 -0
  409. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.openssl-3.txt +177 -0
  410. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.sqlite.txt +23 -0
  411. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.tcl.txt +40 -0
  412. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.tix.txt +54 -0
  413. package/binary/licenses/supplemental/python-build-standalone-20260929/LICENSE.zlib.txt +21 -0
  414. package/binary/licenses/supplemental/python-calamine-0.8.2/LICENSE +21 -0
  415. package/binary/licenses/supplemental/python-calamine-0.8.2/source-identity/Cargo.lock +620 -0
  416. package/binary/licenses/supplemental/python-calamine-0.8.2/source-identity/Cargo.toml +22 -0
  417. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/LICENSE +21 -0
  418. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/engine-headers/upstream-quickjs/cutils.h.txt +24 -0
  419. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/engine-headers/upstream-quickjs/dtoa.c.txt +23 -0
  420. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/engine-headers/upstream-quickjs/dtoa.h.txt +23 -0
  421. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/engine-headers/upstream-quickjs/libregexp-opcode.h.txt +23 -0
  422. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/engine-headers/upstream-quickjs/libregexp.c.txt +23 -0
  423. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/engine-headers/upstream-quickjs/libregexp.h.txt +23 -0
  424. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/engine-headers/upstream-quickjs/libunicode.c.txt +23 -0
  425. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/engine-headers/upstream-quickjs/libunicode.h.txt +23 -0
  426. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/engine-headers/upstream-quickjs/list.h.txt +23 -0
  427. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/engine-headers/upstream-quickjs/quickjs-atom.h.txt +24 -0
  428. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/engine-headers/upstream-quickjs/quickjs-opcode.h.txt +24 -0
  429. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/engine-headers/upstream-quickjs/quickjs.c.txt +26 -0
  430. package/binary/licenses/supplemental/quickjs-ng-0.17.0.1/engine-headers/upstream-quickjs/quickjs.h.txt +26 -0
  431. package/binary/licenses/supplemental/rust-adler2-2.0.1/LICENSE-0BSD +12 -0
  432. package/binary/licenses/supplemental/rust-adler2-2.0.1/LICENSE-APACHE +201 -0
  433. package/binary/licenses/supplemental/rust-adler2-2.0.1/LICENSE-MIT +23 -0
  434. package/binary/licenses/supplemental/rust-android_system_properties-0.1.5/LICENSE-APACHE +13 -0
  435. package/binary/licenses/supplemental/rust-android_system_properties-0.1.5/LICENSE-MIT +20 -0
  436. package/binary/licenses/supplemental/rust-atoi_simd-0.18.1/LICENSE-APACHE +201 -0
  437. package/binary/licenses/supplemental/rust-atoi_simd-0.18.1/LICENSE-MIT +25 -0
  438. package/binary/licenses/supplemental/rust-autocfg-1.5.1/LICENSE-APACHE +201 -0
  439. package/binary/licenses/supplemental/rust-autocfg-1.5.1/LICENSE-MIT +25 -0
  440. package/binary/licenses/supplemental/rust-bumpalo-3.20.3/LICENSE-APACHE +201 -0
  441. package/binary/licenses/supplemental/rust-bumpalo-3.20.3/LICENSE-MIT +25 -0
  442. package/binary/licenses/supplemental/rust-byteorder-1.5.0/COPYING +3 -0
  443. package/binary/licenses/supplemental/rust-byteorder-1.5.0/LICENSE-MIT +21 -0
  444. package/binary/licenses/supplemental/rust-calamine-0.36.0/LICENSE-MIT.md +23 -0
  445. package/binary/licenses/supplemental/rust-cc-1.2.64/LICENSE-APACHE +201 -0
  446. package/binary/licenses/supplemental/rust-cc-1.2.64/LICENSE-MIT +25 -0
  447. package/binary/licenses/supplemental/rust-cfg-if-1.0.4/LICENSE-APACHE +201 -0
  448. package/binary/licenses/supplemental/rust-cfg-if-1.0.4/LICENSE-MIT +25 -0
  449. package/binary/licenses/supplemental/rust-chrono-0.4.45/LICENSE.txt +240 -0
  450. package/binary/licenses/supplemental/rust-codepage-0.1.2/COPYRIGHT +9 -0
  451. package/binary/licenses/supplemental/rust-codepage-0.1.2/LICENSE-APACHE +202 -0
  452. package/binary/licenses/supplemental/rust-codepage-0.1.2/LICENSE-MIT +25 -0
  453. package/binary/licenses/supplemental/rust-core-foundation-sys-0.8.7/LICENSE-APACHE +201 -0
  454. package/binary/licenses/supplemental/rust-core-foundation-sys-0.8.7/LICENSE-MIT +25 -0
  455. package/binary/licenses/supplemental/rust-crc32fast-1.5.0/LICENSE-APACHE +202 -0
  456. package/binary/licenses/supplemental/rust-crc32fast-1.5.0/LICENSE-MIT +21 -0
  457. package/binary/licenses/supplemental/rust-debug_unsafe-0.1.4/LICENSE-APACHE +201 -0
  458. package/binary/licenses/supplemental/rust-debug_unsafe-0.1.4/LICENSE-MIT +25 -0
  459. package/binary/licenses/supplemental/rust-encoding_rs-0.8.35/COPYRIGHT +17 -0
  460. package/binary/licenses/supplemental/rust-encoding_rs-0.8.35/LICENSE-APACHE +202 -0
  461. package/binary/licenses/supplemental/rust-encoding_rs-0.8.35/LICENSE-MIT +25 -0
  462. package/binary/licenses/supplemental/rust-encoding_rs-0.8.35/LICENSE-WHATWG +26 -0
  463. package/binary/licenses/supplemental/rust-equivalent-1.0.2/LICENSE-APACHE +201 -0
  464. package/binary/licenses/supplemental/rust-equivalent-1.0.2/LICENSE-MIT +25 -0
  465. package/binary/licenses/supplemental/rust-fast-float2-0.2.3/LICENSE-APACHE +201 -0
  466. package/binary/licenses/supplemental/rust-fast-float2-0.2.3/LICENSE-MIT +23 -0
  467. package/binary/licenses/supplemental/rust-find-msvc-tools-0.1.9/LICENSE-APACHE +201 -0
  468. package/binary/licenses/supplemental/rust-find-msvc-tools-0.1.9/LICENSE-MIT +25 -0
  469. package/binary/licenses/supplemental/rust-flate2-1.1.9/LICENSE-APACHE +201 -0
  470. package/binary/licenses/supplemental/rust-flate2-1.1.9/LICENSE-MIT +25 -0
  471. package/binary/licenses/supplemental/rust-futures-core-0.3.32/LICENSE-APACHE +202 -0
  472. package/binary/licenses/supplemental/rust-futures-core-0.3.32/LICENSE-MIT +26 -0
  473. package/binary/licenses/supplemental/rust-futures-task-0.3.32/LICENSE-APACHE +202 -0
  474. package/binary/licenses/supplemental/rust-futures-task-0.3.32/LICENSE-MIT +26 -0
  475. package/binary/licenses/supplemental/rust-futures-util-0.3.32/LICENSE-APACHE +202 -0
  476. package/binary/licenses/supplemental/rust-futures-util-0.3.32/LICENSE-MIT +26 -0
  477. package/binary/licenses/supplemental/rust-hashbrown-0.17.1/LICENSE-APACHE +201 -0
  478. package/binary/licenses/supplemental/rust-hashbrown-0.17.1/LICENSE-MIT +25 -0
  479. package/binary/licenses/supplemental/rust-heck-0.5.0/LICENSE-APACHE +201 -0
  480. package/binary/licenses/supplemental/rust-heck-0.5.0/LICENSE-MIT +25 -0
  481. package/binary/licenses/supplemental/rust-iana-time-zone-0.1.65/LICENSE-APACHE +201 -0
  482. package/binary/licenses/supplemental/rust-iana-time-zone-0.1.65/LICENSE-MIT +25 -0
  483. package/binary/licenses/supplemental/rust-iana-time-zone-haiku-0.1.2/LICENSE-APACHE +201 -0
  484. package/binary/licenses/supplemental/rust-iana-time-zone-haiku-0.1.2/LICENSE-MIT +25 -0
  485. package/binary/licenses/supplemental/rust-indexmap-2.14.0/LICENSE-APACHE +201 -0
  486. package/binary/licenses/supplemental/rust-indexmap-2.14.0/LICENSE-MIT +25 -0
  487. package/binary/licenses/supplemental/rust-js-sys-0.3.102/LICENSE-APACHE +201 -0
  488. package/binary/licenses/supplemental/rust-js-sys-0.3.102/LICENSE-MIT +25 -0
  489. package/binary/licenses/supplemental/rust-libc-0.2.186/LICENSE-APACHE +176 -0
  490. package/binary/licenses/supplemental/rust-libc-0.2.186/LICENSE-MIT +25 -0
  491. package/binary/licenses/supplemental/rust-log-0.4.32/LICENSE-APACHE +201 -0
  492. package/binary/licenses/supplemental/rust-log-0.4.32/LICENSE-MIT +25 -0
  493. package/binary/licenses/supplemental/rust-memchr-2.8.2/COPYING +3 -0
  494. package/binary/licenses/supplemental/rust-memchr-2.8.2/LICENSE-MIT +21 -0
  495. package/binary/licenses/supplemental/rust-miniz_oxide-0.8.9/LICENSE +25 -0
  496. package/binary/licenses/supplemental/rust-miniz_oxide-0.8.9/LICENSE-APACHE.md +177 -0
  497. package/binary/licenses/supplemental/rust-miniz_oxide-0.8.9/LICENSE-MIT.md +24 -0
  498. package/binary/licenses/supplemental/rust-miniz_oxide-0.8.9/LICENSE-ZLIB.md +14 -0
  499. package/binary/licenses/supplemental/rust-num-traits-0.2.19/LICENSE-APACHE +201 -0
  500. package/binary/licenses/supplemental/rust-num-traits-0.2.19/LICENSE-MIT +25 -0
  501. package/binary/licenses/supplemental/rust-once_cell-1.21.4/LICENSE-APACHE +201 -0
  502. package/binary/licenses/supplemental/rust-once_cell-1.21.4/LICENSE-MIT +23 -0
  503. package/binary/licenses/supplemental/rust-pin-project-lite-0.2.17/LICENSE-APACHE +177 -0
  504. package/binary/licenses/supplemental/rust-pin-project-lite-0.2.17/LICENSE-MIT +23 -0
  505. package/binary/licenses/supplemental/rust-portable-atomic-1.13.1/LICENSE-APACHE +177 -0
  506. package/binary/licenses/supplemental/rust-portable-atomic-1.13.1/LICENSE-MIT +23 -0
  507. package/binary/licenses/supplemental/rust-proc-macro2-1.0.106/LICENSE-APACHE +176 -0
  508. package/binary/licenses/supplemental/rust-proc-macro2-1.0.106/LICENSE-MIT +23 -0
  509. package/binary/licenses/supplemental/rust-pyo3-0.29.0/LICENSE-APACHE +178 -0
  510. package/binary/licenses/supplemental/rust-pyo3-0.29.0/LICENSE-MIT +25 -0
  511. package/binary/licenses/supplemental/rust-pyo3-0.29.0/pyo3-runtime/LICENSE-APACHE +178 -0
  512. package/binary/licenses/supplemental/rust-pyo3-0.29.0/pyo3-runtime/LICENSE-MIT +25 -0
  513. package/binary/licenses/supplemental/rust-pyo3-build-config-0.29.0/LICENSE-APACHE +178 -0
  514. package/binary/licenses/supplemental/rust-pyo3-build-config-0.29.0/LICENSE-MIT +25 -0
  515. package/binary/licenses/supplemental/rust-pyo3-ffi-0.29.0/LICENSE-APACHE +178 -0
  516. package/binary/licenses/supplemental/rust-pyo3-ffi-0.29.0/LICENSE-MIT +25 -0
  517. package/binary/licenses/supplemental/rust-pyo3-file-0.16.0/Cargo.toml +14 -0
  518. package/binary/licenses/supplemental/rust-pyo3-file-0.16.0/README.md +90 -0
  519. package/binary/licenses/supplemental/rust-pyo3-file-0.16.0/declared-license/Apache-2.0.txt +73 -0
  520. package/binary/licenses/supplemental/rust-pyo3-macros-0.29.0/LICENSE-APACHE +178 -0
  521. package/binary/licenses/supplemental/rust-pyo3-macros-0.29.0/LICENSE-MIT +25 -0
  522. package/binary/licenses/supplemental/rust-pyo3-macros-backend-0.29.0/LICENSE-APACHE +178 -0
  523. package/binary/licenses/supplemental/rust-pyo3-macros-backend-0.29.0/LICENSE-MIT +25 -0
  524. package/binary/licenses/supplemental/rust-quick-xml-0.41.0/LICENSE-MIT.md +23 -0
  525. package/binary/licenses/supplemental/rust-quote-1.0.45/LICENSE-APACHE +176 -0
  526. package/binary/licenses/supplemental/rust-quote-1.0.45/LICENSE-MIT +23 -0
  527. package/binary/licenses/supplemental/rust-rustversion-1.0.22/LICENSE-APACHE +176 -0
  528. package/binary/licenses/supplemental/rust-rustversion-1.0.22/LICENSE-MIT +23 -0
  529. package/binary/licenses/supplemental/rust-serde-1.0.228/LICENSE-APACHE +176 -0
  530. package/binary/licenses/supplemental/rust-serde-1.0.228/LICENSE-MIT +23 -0
  531. package/binary/licenses/supplemental/rust-serde_core-1.0.228/LICENSE-APACHE +176 -0
  532. package/binary/licenses/supplemental/rust-serde_core-1.0.228/LICENSE-MIT +23 -0
  533. package/binary/licenses/supplemental/rust-serde_derive-1.0.228/LICENSE-APACHE +176 -0
  534. package/binary/licenses/supplemental/rust-serde_derive-1.0.228/LICENSE-MIT +23 -0
  535. package/binary/licenses/supplemental/rust-shlex-2.0.1/LICENSE-APACHE +13 -0
  536. package/binary/licenses/supplemental/rust-shlex-2.0.1/LICENSE-MIT +21 -0
  537. package/binary/licenses/supplemental/rust-simd-adler32-0.3.9/LICENSE.md +21 -0
  538. package/binary/licenses/supplemental/rust-slab-0.4.12/LICENSE +25 -0
  539. package/binary/licenses/supplemental/rust-syn-2.0.118/LICENSE-APACHE +176 -0
  540. package/binary/licenses/supplemental/rust-syn-2.0.118/LICENSE-MIT +23 -0
  541. package/binary/licenses/supplemental/rust-target-lexicon-0.13.5/LICENSE +220 -0
  542. package/binary/licenses/supplemental/rust-typed-path-0.12.3/LICENSE-APACHE +176 -0
  543. package/binary/licenses/supplemental/rust-typed-path-0.12.3/LICENSE-MIT +23 -0
  544. package/binary/licenses/supplemental/rust-unicode-ident-1.0.24/LICENSE-APACHE +176 -0
  545. package/binary/licenses/supplemental/rust-unicode-ident-1.0.24/LICENSE-MIT +23 -0
  546. package/binary/licenses/supplemental/rust-unicode-ident-1.0.24/LICENSE-UNICODE +39 -0
  547. package/binary/licenses/supplemental/rust-wasm-bindgen-0.2.125/LICENSE-APACHE +201 -0
  548. package/binary/licenses/supplemental/rust-wasm-bindgen-0.2.125/LICENSE-MIT +25 -0
  549. package/binary/licenses/supplemental/rust-wasm-bindgen-macro-0.2.125/LICENSE-APACHE +201 -0
  550. package/binary/licenses/supplemental/rust-wasm-bindgen-macro-0.2.125/LICENSE-MIT +25 -0
  551. package/binary/licenses/supplemental/rust-wasm-bindgen-macro-support-0.2.125/LICENSE-APACHE +201 -0
  552. package/binary/licenses/supplemental/rust-wasm-bindgen-macro-support-0.2.125/LICENSE-MIT +25 -0
  553. package/binary/licenses/supplemental/rust-wasm-bindgen-shared-0.2.125/LICENSE-APACHE +201 -0
  554. package/binary/licenses/supplemental/rust-wasm-bindgen-shared-0.2.125/LICENSE-MIT +25 -0
  555. package/binary/licenses/supplemental/rust-windows-core-0.62.2/license-apache-2.0 +201 -0
  556. package/binary/licenses/supplemental/rust-windows-core-0.62.2/license-mit +21 -0
  557. package/binary/licenses/supplemental/rust-windows-implement-0.60.2/license-apache-2.0 +201 -0
  558. package/binary/licenses/supplemental/rust-windows-implement-0.60.2/license-mit +21 -0
  559. package/binary/licenses/supplemental/rust-windows-interface-0.59.3/license-apache-2.0 +201 -0
  560. package/binary/licenses/supplemental/rust-windows-interface-0.59.3/license-mit +21 -0
  561. package/binary/licenses/supplemental/rust-windows-link-0.2.1/license-apache-2.0 +201 -0
  562. package/binary/licenses/supplemental/rust-windows-link-0.2.1/license-mit +21 -0
  563. package/binary/licenses/supplemental/rust-windows-result-0.4.1/license-apache-2.0 +201 -0
  564. package/binary/licenses/supplemental/rust-windows-result-0.4.1/license-mit +21 -0
  565. package/binary/licenses/supplemental/rust-windows-strings-0.5.1/license-apache-2.0 +201 -0
  566. package/binary/licenses/supplemental/rust-windows-strings-0.5.1/license-mit +21 -0
  567. package/binary/licenses/supplemental/rust-zip-8.6.0/LICENSE +21 -0
  568. package/binary/licenses/supplemental/rust-zlib-rs-0.6.3/LICENSE +19 -0
  569. package/binary/licenses/supplemental/rust-zopfli-0.8.3/COPYING +201 -0
  570. package/binary/licenses/supplemental/selectolax-0.4.13/LICENSE +10 -0
  571. package/binary/licenses/supplemental/selectolax-0.4.13/lexbor/LICENSE +223 -0
  572. package/binary/licenses/supplemental/selectolax-0.4.13/lexbor/NOTICE +16 -0
  573. package/binary/version.json +6 -0
  574. package/native-manifest.json +4474 -0
  575. package/native-verification.json +338 -0
  576. package/package.json +27 -4
@@ -0,0 +1,976 @@
1
+ cimport cython
2
+ from cpython.exc cimport PyErr_NoMemory
3
+
4
+ from libc.stdlib cimport free
5
+ from libc.stdlib cimport malloc
6
+ from libc.stdlib cimport realloc
7
+ from libc.string cimport memcpy
8
+
9
+ DEF _STACK_SIZE = 100
10
+ DEF _ENCODING = 'UTF-8'
11
+
12
+
13
+ @cython.final
14
+ @cython.internal
15
+ cdef class Stack:
16
+ def __cinit__(self, size_t capacity=25):
17
+ self.capacity = capacity
18
+ self.top = 0
19
+ self._stack = <myhtml_tree_node_t**> malloc(capacity * sizeof(myhtml_tree_node_t))
20
+ if self._stack == NULL:
21
+ raise MemoryError("Failed to allocate memory for stack")
22
+
23
+ def __dealloc__(self):
24
+ free(self._stack)
25
+
26
+ cdef bint is_empty(self):
27
+ return self.top <= 0
28
+
29
+ cdef int push(self, myhtml_tree_node_t* res) except -1:
30
+ if self.top >= self.capacity:
31
+ if self.resize() < 0:
32
+ return -1
33
+ self._stack[self.top] = res
34
+ self.top += 1
35
+
36
+ cdef myhtml_tree_node_t * pop(self):
37
+ self.top = self.top - 1
38
+ return self._stack[self.top]
39
+
40
+ cdef int resize(self) except -1:
41
+ self.capacity *= 2
42
+ self._stack = <myhtml_tree_node_t**> realloc(<void*> self._stack, self.capacity * sizeof(myhtml_tree_node_t))
43
+ if self._stack == NULL:
44
+ PyErr_NoMemory()
45
+ return -1
46
+ return 0
47
+
48
+ cdef class _Attributes:
49
+ """A dict-like object that represents attributes."""
50
+ cdef myhtml_tree_node_t * node
51
+ cdef unicode decode_errors
52
+
53
+ @staticmethod
54
+ cdef _Attributes create(myhtml_tree_node_t *node, unicode decode_errors):
55
+ obj = <_Attributes>_Attributes.__new__(_Attributes)
56
+ obj.node = node
57
+ obj.decode_errors = decode_errors
58
+ return obj
59
+
60
+ def __iter__(self):
61
+ cdef myhtml_tree_attr_t *attr = myhtml_node_attribute_first(self.node)
62
+ while attr:
63
+ if attr.key.data == NULL:
64
+ attr = attr.next
65
+ continue
66
+ key = attr.key.data.decode(_ENCODING, self.decode_errors)
67
+ attr = attr.next
68
+ yield key
69
+
70
+ def __setitem__(self, str key, value):
71
+ value = str(value)
72
+ bytes_key = key.encode(_ENCODING)
73
+ bytes_value = value.encode(_ENCODING)
74
+ myhtml_attribute_remove_by_key(self.node, <char*>bytes_key, len(bytes_key))
75
+ myhtml_attribute_add(self.node, <char*>bytes_key, len(bytes_key), <char*>bytes_value, len(bytes_value),
76
+ MyENCODING_UTF_8)
77
+
78
+ def __delitem__(self, key):
79
+ try:
80
+ self.__getitem__(key)
81
+ except KeyError:
82
+ raise KeyError(key)
83
+ bytes_key = key.encode(_ENCODING)
84
+ myhtml_attribute_remove_by_key(self.node, <char*>bytes_key, len(bytes_key))
85
+
86
+ def __getitem__(self, str key):
87
+ bytes_key = key.encode(_ENCODING)
88
+ cdef myhtml_tree_attr_t * attr = myhtml_attribute_by_key(self.node, <char*>bytes_key, len(bytes_key))
89
+ if attr != NULL:
90
+ if attr.value.data != NULL:
91
+ return attr.value.data.decode(_ENCODING, self.decode_errors)
92
+ elif attr.key.data != NULL:
93
+ return None
94
+ raise KeyError(key)
95
+
96
+ def __len__(self):
97
+ return len(list(self.__iter__()))
98
+
99
+ def keys(self):
100
+ return self.__iter__()
101
+
102
+ def items(self):
103
+ for key in self.__iter__():
104
+ yield key, self[key]
105
+
106
+ def values(self):
107
+ for key in self.__iter__():
108
+ yield self[key]
109
+
110
+ def get(self, key, default=None):
111
+ try:
112
+ return self[key]
113
+ except KeyError:
114
+ return default
115
+
116
+ def sget(self, key, default=""):
117
+ """Same as get, but returns empty strings instead of None values for empty attributes."""
118
+ try:
119
+ val = self[key]
120
+ if val is None:
121
+ val = ""
122
+ return val
123
+ except KeyError:
124
+ return default
125
+
126
+ def __contains__(self, key):
127
+ try:
128
+ self[key]
129
+ except KeyError:
130
+ return False
131
+ else:
132
+ return True
133
+
134
+ def __repr__(self):
135
+ cdef const char *c_text
136
+ c_text = myhtml_tag_name_by_id(self.node.tree, self.node.tag_id, NULL)
137
+ tag_name = c_text.decode(_ENCODING, 'ignore') if c_text != NULL else 'unknown'
138
+ return "<%s attributes, %s items>" % (tag_name, len(self))
139
+
140
+ ctypedef fused str_or_Node:
141
+ str
142
+ bytes
143
+ Node
144
+
145
+ cdef class Node:
146
+ """A class that represents HTML node (element)."""
147
+ cdef myhtml_tree_node_t *node
148
+ cdef public HTMLParser parser
149
+
150
+ @staticmethod
151
+ cdef Node new(myhtml_tree_node_t *node, HTMLParser parser):
152
+ # custom __init__ for C, because __cinit__ doesn't accept C types
153
+ cdef Node cls = Node.__new__(Node)
154
+ cls.node = node
155
+ # Keep reference to the selector object, so myhtml structures will not be garbage collected prematurely
156
+ cls.parser = parser
157
+ return cls
158
+
159
+ @property
160
+ def attributes(self):
161
+ """Get all attributes that belong to the current node.
162
+
163
+ The value of empty attributes is None.
164
+
165
+ Returns
166
+ -------
167
+ attributes : dictionary of all attributes.
168
+
169
+ Examples
170
+ --------
171
+
172
+ >>> tree = HTMLParser("<div data id='my_id'></div>")
173
+ >>> node = tree.css_first('div')
174
+ >>> node.attributes
175
+ {'data': None, 'id': 'my_id'}
176
+ """
177
+ cdef myhtml_tree_attr_t *attr = myhtml_node_attribute_first(self.node)
178
+ attributes = dict()
179
+
180
+ while attr:
181
+ if attr.key.data == NULL:
182
+ attr = attr.next
183
+ continue
184
+ key = attr.key.data.decode(_ENCODING, self.parser.decode_errors)
185
+ if attr.value.data:
186
+ value = attr.value.data.decode(_ENCODING, self.parser.decode_errors)
187
+ else:
188
+ value = None
189
+ attributes[key] = value
190
+
191
+ attr = attr.next
192
+
193
+ return attributes
194
+
195
+ @property
196
+ def attrs(self):
197
+ """A dict-like object that is similar to the ``attributes`` property, but operates directly on the Node data.
198
+
199
+ .. warning:: Use ``attributes`` instead, if you don't want to modify Node attributes.
200
+
201
+ Returns
202
+ -------
203
+ attributes : Attributes mapping object.
204
+
205
+ Examples
206
+ --------
207
+
208
+ >>> tree = HTMLParser("<div id='a'></div>")
209
+ >>> node = tree.css_first('div')
210
+ >>> node.attrs
211
+ <div attributes, 1 items>
212
+ >>> node.attrs['id']
213
+ 'a'
214
+ >>> node.attrs['foo'] = 'bar'
215
+ >>> del node.attrs['id']
216
+ >>> node.attributes
217
+ {'foo': 'bar'}
218
+ >>> node.attrs['id'] = 'new_id'
219
+ >>> node.html
220
+ '<div foo="bar" id="new_id"></div>'
221
+ """
222
+ cdef _Attributes attributes = _Attributes.create(self.node, self.parser.decode_errors)
223
+ return attributes
224
+
225
+ @property
226
+ def mem_id(self):
227
+ """Get the mem_id attribute of the node.
228
+
229
+ Returns
230
+ -------
231
+ text : int
232
+ """
233
+ return <size_t> self.node
234
+
235
+ @property
236
+ def id(self):
237
+ """Get the id attribute of the node.
238
+
239
+ Returns None if id does not set.
240
+
241
+ Returns
242
+ -------
243
+ text : str
244
+ """
245
+ cdef char* key = 'id'
246
+ cdef myhtml_tree_attr_t *attr
247
+ attr = myhtml_attribute_by_key(self.node, key, 2)
248
+ return None if attr == NULL else attr.value.data.decode(_ENCODING, self.parser.decode_errors)
249
+
250
+ def __hash__(self):
251
+ return self.mem_id
252
+
253
+ def text(self, bool deep=True, str separator='', bool strip=False):
254
+ """Returns the text of the node including text of all its child nodes.
255
+
256
+ Parameters
257
+ ----------
258
+ strip : bool, default False
259
+ If true, calls ``str.strip()`` on each text part to remove extra white spaces.
260
+ separator : str, default ''
261
+ The separator to use when joining text from different nodes.
262
+ deep : bool, default True
263
+ If True, includes text from all child nodes.
264
+
265
+ Returns
266
+ -------
267
+ text : str
268
+
269
+ """
270
+ cdef const char* c_text
271
+ cdef myhtml_tree_node_t *node = self.node.child
272
+ cdef list parts = []
273
+
274
+ if not deep:
275
+ if self.node.tag_id == MyHTML_TAG__TEXT:
276
+ c_text = myhtml_node_text(self.node, NULL)
277
+ if c_text != NULL:
278
+ node_text = c_text.decode(_ENCODING, self.parser.decode_errors)
279
+ parts.append(node_text.strip() if strip else node_text)
280
+
281
+ while node != NULL:
282
+ if node.tag_id == MyHTML_TAG__TEXT:
283
+ c_text = myhtml_node_text(node, NULL)
284
+ if c_text != NULL:
285
+ node_text = c_text.decode(_ENCODING, self.parser.decode_errors)
286
+ parts.append(node_text.strip() if strip else node_text)
287
+ node = node.next
288
+ else:
289
+ self._text_deep(self.node, parts, strip)
290
+ return separator.join(parts)
291
+
292
+ cdef inline _text_deep(self, myhtml_tree_node_t *node, list parts, bint strip):
293
+ cdef Stack stack = Stack(_STACK_SIZE)
294
+ cdef myhtml_tree_node_t* current_node = NULL
295
+ cdef const char* c_text
296
+
297
+ if node.tag_id == MyHTML_TAG__TEXT:
298
+ c_text = myhtml_node_text(node, NULL)
299
+ if c_text != NULL:
300
+ node_text = c_text.decode(_ENCODING, self.parser.decode_errors)
301
+ parts.append(node_text.strip() if strip else node_text)
302
+
303
+ if node.child == NULL:
304
+ return
305
+
306
+ stack.push(node.child)
307
+
308
+ # Depth-first left-to-right tree traversal
309
+ while not stack.is_empty():
310
+ current_node = stack.pop()
311
+
312
+ if current_node != NULL:
313
+ if current_node.tag_id == MyHTML_TAG__TEXT:
314
+ c_text = myhtml_node_text(current_node, NULL)
315
+ if c_text != NULL:
316
+ node_text = c_text.decode(_ENCODING, self.parser.decode_errors)
317
+ parts.append(node_text.strip() if strip else node_text)
318
+
319
+ if current_node.next is not NULL:
320
+ stack.push(current_node.next)
321
+
322
+ if current_node.child is not NULL:
323
+ stack.push(current_node.child)
324
+
325
+ def iter(self, include_text=False):
326
+ """Iterate over nodes on the current level.
327
+
328
+ Parameters
329
+ ----------
330
+ include_text : bool
331
+ If True, includes text nodes as well.
332
+
333
+ Yields
334
+ -------
335
+ node
336
+ """
337
+
338
+ cdef myhtml_tree_node_t *node = self.node.child
339
+ cdef Node next_node
340
+
341
+ while node != NULL:
342
+ if node.tag_id == MyHTML_TAG__TEXT and not include_text:
343
+ node = node.next
344
+ continue
345
+
346
+ next_node = Node.new(node, self.parser)
347
+ yield next_node
348
+ node = node.next
349
+
350
+ def traverse(self, include_text=False):
351
+ """Iterate over all child and next nodes starting from the current level.
352
+
353
+ Parameters
354
+ ----------
355
+ include_text : bool
356
+ If True, includes text nodes as well.
357
+
358
+ Yields
359
+ -------
360
+ node
361
+ """
362
+ cdef Stack stack = Stack(_STACK_SIZE)
363
+ cdef myhtml_tree_node_t* current_node = NULL
364
+ cdef Node next_node
365
+
366
+ stack.push(self.node)
367
+
368
+ while not stack.is_empty():
369
+ current_node = stack.pop()
370
+ if current_node != NULL and not (current_node.tag_id == MyHTML_TAG__TEXT and not include_text):
371
+ next_node = Node.new(current_node, self.parser)
372
+ yield next_node
373
+
374
+ if current_node.next is not NULL:
375
+ stack.push(current_node.next)
376
+
377
+ if current_node.child is not NULL:
378
+ stack.push(current_node.child)
379
+
380
+ @property
381
+ def tag(self):
382
+ """Return the name of the current tag (e.g. div, p, img).
383
+
384
+ Returns
385
+ -------
386
+ text : str
387
+ """
388
+ cdef const char *c_text
389
+ c_text = myhtml_tag_name_by_id(self.node.tree, self.node.tag_id, NULL)
390
+ text = None
391
+ if c_text:
392
+ text = c_text.decode(_ENCODING, self.parser.decode_errors)
393
+ return text
394
+
395
+ @property
396
+ def child(self):
397
+ """Alias for the `first_child` property.
398
+
399
+ **Deprecated**. Please use `first_child` instead.
400
+ """
401
+ cdef Node node
402
+ if self.node.child:
403
+ node = Node.new(self.node.child, self.parser)
404
+ return node
405
+ return None
406
+
407
+ @property
408
+ def parent(self):
409
+ """Return the parent node."""
410
+ cdef Node node
411
+ if self.node.parent:
412
+ node = Node.new(self.node.parent, self.parser)
413
+ return node
414
+ return None
415
+
416
+ @property
417
+ def next(self):
418
+ """Return next node."""
419
+ cdef Node node
420
+ if self.node.next:
421
+ node = Node.new(self.node.next, self.parser)
422
+ return node
423
+ return None
424
+
425
+ @property
426
+ def prev(self):
427
+ """Return previous node."""
428
+ cdef Node node
429
+ if self.node.prev:
430
+ node = Node.new(self.node.prev, self.parser)
431
+ return node
432
+ return None
433
+
434
+ @property
435
+ def last_child(self):
436
+ """Return last child node."""
437
+ cdef Node node
438
+ if self.node.last_child:
439
+ node = Node.new(self.node.last_child, self.parser)
440
+ return node
441
+ return None
442
+
443
+ @property
444
+ def html(self):
445
+ """Return HTML representation of the current node including all its child nodes.
446
+
447
+ Returns
448
+ -------
449
+ text : str
450
+ """
451
+ cdef mycore_string_raw_t c_str
452
+ c_str.data = NULL
453
+ c_str.length = 0
454
+ c_str.size = 0
455
+
456
+ cdef mystatus_t status
457
+ status = myhtml_serialization(self.node, &c_str)
458
+
459
+ if status == 0 and c_str.data:
460
+ html = c_str.data.decode(_ENCODING).replace('<-undef>', '')
461
+ free(c_str.data)
462
+ return html
463
+
464
+ return None
465
+
466
+ def css(self, str query):
467
+ """Evaluate CSS selector against current node and its child nodes."""
468
+ return find_nodes(self.parser, self.node, query)
469
+
470
+ def any_css_matches(self, tuple selectors):
471
+ """Returns True if any of CSS selectors matches a node"""
472
+ return find_matches(self.parser, self.node, selectors)
473
+
474
+ def css_matches(self, str selector):
475
+ """Returns True if CSS selector matches a node."""
476
+ return find_matches(self.parser, self.node, (selector, ))
477
+
478
+ def css_first(self, str query, default=None, bool strict=False):
479
+ """Evaluate CSS selector against current node and its child nodes."""
480
+ results = self.css(query)
481
+ n_results = len(results)
482
+
483
+ if n_results > 0:
484
+
485
+ if strict and n_results > 1:
486
+ raise ValueError("Expected 1 match, but found %s matches" % n_results)
487
+
488
+ return results[0]
489
+
490
+ return default
491
+
492
+ def decompose(self, bool recursive=True):
493
+ """Remove a Node from the tree.
494
+
495
+ Parameters
496
+ ----------
497
+ recursive : bool, default True
498
+ Whenever to delete all its child nodes
499
+
500
+ Examples
501
+ --------
502
+
503
+ >>> tree = HTMLParser(html)
504
+ >>> for tag in tree.css('script'):
505
+ >>> tag.decompose()
506
+
507
+ """
508
+ if recursive:
509
+ myhtml_node_delete_recursive(self.node)
510
+ else:
511
+ myhtml_node_delete(self.node)
512
+
513
+ def remove(self, bool recursive=True):
514
+ """An alias for the decompose method."""
515
+ self.decompose(recursive)
516
+
517
+ def unwrap(self, delete_empty = False):
518
+ """Replace node with whatever is inside this node.
519
+
520
+ Parameters
521
+ ----------
522
+ delete_empty : bool, default False
523
+ Whenever to delete empty tags.
524
+
525
+ Examples
526
+ --------
527
+
528
+ >>> tree = HTMLParser("<div>Hello <i>world</i>!</div>")
529
+ >>> tree.css_first('i').unwrap()
530
+ >>> tree.html
531
+ '<html><head></head><body><div>Hello world!</div></body></html>'
532
+
533
+ Note: by default, empty tags are ignored, set "delete_empty" to "True" to change this.
534
+ """
535
+ if self.node.child == NULL:
536
+ if delete_empty:
537
+ myhtml_node_delete(self.node)
538
+ return
539
+ cdef myhtml_tree_node_t* next_node
540
+ cdef myhtml_tree_node_t* current_node
541
+
542
+ if self.node.child.next != NULL:
543
+ current_node = self.node.child
544
+ next_node = current_node.next
545
+
546
+ while next_node != NULL:
547
+ next_node = current_node.next
548
+ myhtml_node_insert_before(self.node, current_node)
549
+ current_node = next_node
550
+ else:
551
+ myhtml_node_insert_before(self.node, self.node.child)
552
+ myhtml_node_delete(self.node)
553
+
554
+ def strip_tags(self, list tags, bool recursive = False):
555
+ """Remove specified tags from the HTML tree.
556
+
557
+ Parameters
558
+ ----------
559
+ tags : list
560
+ List of tags to remove.
561
+ recursive : bool, default True
562
+ Whenever to delete all its child nodes
563
+
564
+ Examples
565
+ --------
566
+
567
+ >>> tree = HTMLParser('<html><head></head><body><script></script><div>Hello world!</div></body></html>')
568
+ >>> tags = ['head', 'style', 'script', 'xmp', 'iframe', 'noembed', 'noframes']
569
+ >>> tree.strip_tags(tags)
570
+ >>> tree.html
571
+ '<html><body><div>Hello world!</div></body></html>'
572
+
573
+ """
574
+ # ensure cython can recast element to a Node so that decompose will be called sooner.
575
+ cdef Node element
576
+ for tag in tags:
577
+ for element in self.css(tag):
578
+ element.decompose(recursive=recursive)
579
+
580
+ def unwrap_tags(self, list tags, delete_empty = False):
581
+ """Unwraps specified tags from the HTML tree.
582
+
583
+ Works the same as the ``unwrap`` method, but applied to a list of tags.
584
+
585
+ Parameters
586
+ ----------
587
+ tags : list
588
+ List of tags to remove.
589
+ delete_empty : bool, default False
590
+ Whenever to delete empty tags.
591
+
592
+ Examples
593
+ --------
594
+
595
+ >>> tree = HTMLParser("<div><a href="">Hello</a> <i>world</i>!</div>")
596
+ >>> tree.body.unwrap_tags(['i','a'])
597
+ >>> tree.body.html
598
+ '<body><div>Hello world!</div></body>'
599
+
600
+ Note: by default, empty tags are ignored, set "delete_empty" to "True" to change this.
601
+ """
602
+ cdef Node element
603
+ for tag in tags:
604
+ for element in self.css(tag):
605
+ element.unwrap(delete_empty)
606
+
607
+ def replace_with(self, str_or_Node value):
608
+ """Replace current Node with specified value.
609
+
610
+ Parameters
611
+ ----------
612
+ value : str, bytes or Node
613
+ The text or Node instance to replace the Node with.
614
+ When a text string is passed, it's treated as text. All HTML tags will be escaped.
615
+ Convert and pass the ``Node`` object when you want to work with HTML.
616
+ Does not clone the ``Node`` object.
617
+ All future changes to the passed ``Node`` object will also be taken into account.
618
+
619
+ Examples
620
+ --------
621
+
622
+ >>> tree = HTMLParser('<div>Get <img src="" alt="Laptop"></div>')
623
+ >>> img = tree.css_first('img')
624
+ >>> img.replace_with(img.attributes.get('alt', ''))
625
+ >>> tree.body.child.html
626
+ '<div>Get Laptop</div>'
627
+
628
+ >>> html_parser = HTMLParser('<div>Get <span alt="Laptop"><img src="/jpg"> <div></div></span></div>')
629
+ >>> html_parser2 = HTMLParser('<div>Test</div>')
630
+ >>> img_node = html_parser.css_first('img')
631
+ >>> img_node.replace_with(html_parser2.body.child)
632
+ '<div>Get <span alt="Laptop"><div>Test</div> <div></div></span></div>'
633
+ """
634
+ cdef myhtml_tree_node_t *node
635
+ if isinstance(value, (str, bytes, unicode)):
636
+ bytes_val = to_bytes(value)
637
+ node = myhtml_node_create(self.parser.html_tree, MyHTML_TAG__TEXT, MyHTML_NAMESPACE_HTML)
638
+ myhtml_node_text_set(node, <char*> bytes_val, len(bytes_val), MyENCODING_UTF_8)
639
+ myhtml_node_insert_before(self.node, node)
640
+ myhtml_node_delete(self.node)
641
+ elif isinstance(value, Node):
642
+ node = myhtml_node_clone_deep(self.parser.html_tree, <myhtml_tree_node_t *> value.node)
643
+ myhtml_node_insert_before(self.node, node)
644
+ myhtml_node_delete(self.node)
645
+ else:
646
+ raise TypeError("Expected a string or Node instance, but %s found" % type(value).__name__)
647
+
648
+ def insert_before(self, str_or_Node value):
649
+ """
650
+ Insert a node before the current Node.
651
+
652
+ Parameters
653
+ ----------
654
+ value : str, bytes or Node
655
+ The text or Node instance to insert before the Node.
656
+ When a text string is passed, it's treated as text. All HTML tags will be escaped.
657
+ Convert and pass the ``Node`` object when you want to work with HTML.
658
+ Does not clone the ``Node`` object.
659
+ All future changes to the passed ``Node`` object will also be taken into account.
660
+
661
+ Examples
662
+ --------
663
+
664
+ >>> tree = HTMLParser('<div>Get <img src="" alt="Laptop"></div>')
665
+ >>> img = tree.css_first('img')
666
+ >>> img.insert_before(img.attributes.get('alt', ''))
667
+ >>> tree.body.child.html
668
+ '<div>Get Laptop<img src="" alt="Laptop"></div>'
669
+
670
+ >>> html_parser = HTMLParser('<div>Get <span alt="Laptop"><img src="/jpg"> <div></div></span></div>')
671
+ >>> html_parser2 = HTMLParser('<div>Test</div>')
672
+ >>> img_node = html_parser.css_first('img')
673
+ >>> img_node.insert_before(html_parser2.body.child)
674
+ <div>Get <span alt="Laptop"><div>Test</div><img src="/jpg"> <div></div></span></div>'
675
+ """
676
+ cdef myhtml_tree_node_t *node
677
+ if isinstance(value, (str, bytes, unicode)):
678
+ bytes_val = to_bytes(value)
679
+ node = myhtml_node_create(self.parser.html_tree, MyHTML_TAG__TEXT, MyHTML_NAMESPACE_HTML)
680
+ myhtml_node_text_set(node, <char*> bytes_val, len(bytes_val), MyENCODING_UTF_8)
681
+ myhtml_node_insert_before(self.node, node)
682
+ elif isinstance(value, Node):
683
+ node = myhtml_node_clone_deep(self.parser.html_tree, <myhtml_tree_node_t *> value.node)
684
+ myhtml_node_insert_before(self.node, node)
685
+ else:
686
+ raise TypeError("Expected a string or Node instance, but %s found" % type(value).__name__)
687
+
688
+ def insert_after(self, str_or_Node value):
689
+ """
690
+ Insert a node after the current Node.
691
+
692
+ Parameters
693
+ ----------
694
+ value : str, bytes or Node
695
+ The text or Node instance to insert after the Node.
696
+ When a text string is passed, it's treated as text. All HTML tags will be escaped.
697
+ Convert and pass the ``Node`` object when you want to work with HTML.
698
+ Does not clone the ``Node`` object.
699
+ All future changes to the passed ``Node`` object will also be taken into account.
700
+
701
+ Examples
702
+ --------
703
+
704
+ >>> tree = HTMLParser('<div>Get <img src="" alt="Laptop"></div>')
705
+ >>> img = tree.css_first('img')
706
+ >>> img.insert_after(img.attributes.get('alt', ''))
707
+ >>> tree.body.child.html
708
+ '<div>Get <img src="" alt="Laptop">Laptop</div>'
709
+
710
+ >>> html_parser = HTMLParser('<div>Get <span alt="Laptop"><img src="/jpg"> <div></div></span></div>')
711
+ >>> html_parser2 = HTMLParser('<div>Test</div>')
712
+ >>> img_node = html_parser.css_first('img')
713
+ >>> img_node.insert_after(html_parser2.body.child)
714
+ <div>Get <span alt="Laptop"><img src="/jpg"><div>Test</div> <div></div></span></div>'
715
+ """
716
+ cdef myhtml_tree_node_t *node
717
+ if isinstance(value, (str, bytes, unicode)):
718
+ bytes_val = to_bytes(value)
719
+ node = myhtml_node_create(self.parser.html_tree, MyHTML_TAG__TEXT, MyHTML_NAMESPACE_HTML)
720
+ myhtml_node_text_set(node, <char*> bytes_val, len(bytes_val), MyENCODING_UTF_8)
721
+ myhtml_node_insert_after(self.node, node)
722
+ elif isinstance(value, Node):
723
+ node = myhtml_node_clone_deep(self.parser.html_tree, <myhtml_tree_node_t *> value.node)
724
+ myhtml_node_insert_after(self.node, node)
725
+ else:
726
+ raise TypeError("Expected a string or Node instance, but %s found" % type(value).__name__)
727
+
728
+ def insert_child(self, str_or_Node value):
729
+ """
730
+ Insert a node inside (at the end of) the current Node.
731
+
732
+ Parameters
733
+ ----------
734
+ value : str, bytes or Node
735
+ The text or Node instance to insert inside the Node.
736
+ When a text string is passed, it's treated as text. All HTML tags will be escaped.
737
+ Convert and pass the ``Node`` object when you want to work with HTML.
738
+ Does not clone the ``Node`` object.
739
+ All future changes to the passed ``Node`` object will also be taken into account.
740
+
741
+ Examples
742
+ --------
743
+
744
+ >>> tree = HTMLParser('<div>Get <img src=""></div>')
745
+ >>> div = tree.css_first('div')
746
+ >>> div.insert_child('Laptop')
747
+ >>> tree.body.child.html
748
+ '<div>Get <img src="">Laptop</div>'
749
+
750
+ >>> html_parser = HTMLParser('<div>Get <span alt="Laptop"> <div>Laptop</div> </span></div>')
751
+ >>> html_parser2 = HTMLParser('<div>Test</div>')
752
+ >>> span_node = html_parser.css_first('span')
753
+ >>> span_node.insert_child(html_parser2.body.child)
754
+ <div>Get <span alt="Laptop"> <div>Laptop</div> <div>Test</div> </span></div>'
755
+ """
756
+ cdef myhtml_tree_node_t *node
757
+ if isinstance(value, (str, bytes, unicode)):
758
+ bytes_val = to_bytes(value)
759
+ node = myhtml_node_create(self.parser.html_tree, MyHTML_TAG__TEXT, MyHTML_NAMESPACE_HTML)
760
+ myhtml_node_text_set(node, <char*> bytes_val, len(bytes_val), MyENCODING_UTF_8)
761
+ myhtml_node_append_child(self.node, node)
762
+ elif isinstance(value, Node):
763
+ node = myhtml_node_clone_deep(self.parser.html_tree, <myhtml_tree_node_t *> value.node)
764
+ myhtml_node_append_child(self.node, node)
765
+ else:
766
+ raise TypeError("Expected a string or Node instance, but %s found" % type(value).__name__)
767
+
768
+ def unwrap_tags(self, list tags, delete_empty = False):
769
+ """Unwraps specified tags from the HTML tree.
770
+
771
+ Works the same as th ``unwrap`` method, but applied to a list of tags.
772
+
773
+ Parameters
774
+ ----------
775
+ tags : list
776
+ List of tags to remove.
777
+ delete_empty : bool, default False
778
+ Whenever to delete empty tags.
779
+
780
+ Examples
781
+ --------
782
+
783
+ >>> tree = HTMLParser("<div><a href="">Hello</a> <i>world</i>!</div>")
784
+ >>> tree.body.unwrap_tags(['i','a'])
785
+ >>> tree.body.html
786
+ '<body><div>Hello world!</div></body>'
787
+
788
+ Note: by default, empty tags are ignored, set "delete_empty" to "True" to change this.
789
+ """
790
+ cdef Node element
791
+ for tag in tags:
792
+ for element in self.css(tag):
793
+ element.unwrap(delete_empty)
794
+
795
+ @property
796
+ def raw_value(self):
797
+ """Return the raw (unparsed, original) value of a node.
798
+
799
+ Currently, works on text nodes only.
800
+
801
+ Returns
802
+ -------
803
+
804
+ raw_value : bytes
805
+
806
+ Examples
807
+ --------
808
+
809
+ >>> html_parser = HTMLParser('<div>&#x3C;test&#x3E;</div>')
810
+ >>> selector = html_parser.css_first('div')
811
+ >>> selector.child.html
812
+ '&lt;test&gt;'
813
+ >>> selector.child.raw_value
814
+ b'&#x3C;test&#x3E;'
815
+ """
816
+ cdef int begin = self.node.token.element_begin
817
+ cdef int length = self.node.token.element_length
818
+ if self.node.tag_id != MyHTML_TAG__TEXT:
819
+ raise ValueError("Can't obtain raw value for non-text node.")
820
+ return self.parser.raw_html[begin:begin + length]
821
+
822
+ def select(self, query=None):
823
+ """Select nodes given a CSS selector.
824
+
825
+ Works similarly to the ``css`` method, but supports chained filtering and extra features.
826
+
827
+ Parameters
828
+ ----------
829
+ query : str or None
830
+ The CSS selector to use when searching for nodes.
831
+
832
+ Returns
833
+ -------
834
+ selector : The `Selector` class.
835
+ """
836
+ return Selector(self, query)
837
+
838
+ def scripts_contain(self, str query):
839
+ """Returns True if any of the script tags contain specified text.
840
+
841
+ Caches script tags on the first call to improve performance.
842
+
843
+ Parameters
844
+ ----------
845
+ query : str
846
+ The query to check.
847
+
848
+ """
849
+ cdef Node node
850
+ if self.parser.cached_script_texts is None:
851
+ nodes = find_nodes(self.parser, self.node, 'script')
852
+ text_nodes = []
853
+ for node in nodes:
854
+ node_text = node.text(deep=True)
855
+ if node_text:
856
+ text_nodes.append(node_text)
857
+ self.parser.cached_script_texts = text_nodes
858
+
859
+ for text in self.parser.cached_script_texts:
860
+ if query in text:
861
+ return True
862
+ return False
863
+
864
+ def script_srcs_contain(self, tuple queries):
865
+ """Returns True if any of the script SRCs attributes contain on of the specified text.
866
+
867
+ Caches values on the first call to improve performance.
868
+
869
+ Parameters
870
+ ----------
871
+ queries : tuple of str
872
+
873
+ """
874
+ if self.parser.cached_script_srcs is None:
875
+ nodes = find_nodes(self.parser, self.node, 'script')
876
+ src_nodes = []
877
+ for node in nodes:
878
+ node_src = node.attrs.get('src')
879
+ if node_src:
880
+ src_nodes.append(node_src)
881
+ self.parser.cached_script_srcs = src_nodes
882
+
883
+ for text in self.parser.cached_script_srcs:
884
+ for query in queries:
885
+ if query in text:
886
+ return True
887
+ return False
888
+
889
+ def __repr__(self):
890
+ return '<Node %s>' % self.tag
891
+
892
+ def __eq__(self, other):
893
+ if isinstance(other, str):
894
+ return self.html == other
895
+ if not isinstance(other, Node):
896
+ return False
897
+ return self.html == other.html
898
+
899
+ @property
900
+ def text_content(self):
901
+ """Returns the text of the node if it is a text node.
902
+
903
+ Returns None for other nodes.
904
+ Unlike the ``text`` method, does not include child nodes.
905
+
906
+ Returns
907
+ -------
908
+ text : str or None.
909
+ """
910
+ cdef const char* c_text
911
+
912
+ if self.node.tag_id == MyHTML_TAG__TEXT:
913
+ c_text = myhtml_node_text(self.node, NULL)
914
+ if c_text != NULL:
915
+ return c_text.decode(_ENCODING, self.parser.decode_errors)
916
+ return None
917
+
918
+ def merge_text_nodes(self):
919
+ """Iterates over all text nodes and merges all text nodes that are close to each other.
920
+
921
+ This is useful for text extraction.
922
+ Use it when you need to strip HTML tags and merge "dangling" text.
923
+
924
+ Examples
925
+ --------
926
+
927
+ >>> tree = HTMLParser("<div><p><strong>J</strong>ohn</p><p>Doe</p></div>")
928
+ >>> node = tree.css_first('div')
929
+ >>> tree.unwrap_tags(["strong"])
930
+ >>> tree.text(deep=True, separator=" ", strip=True)
931
+ "J ohn Doe" # Text extraction produces an extra space because the strong tag was removed.
932
+ >>> node.merge_text_nodes()
933
+ >>> tree.text(deep=True, separator=" ", strip=True)
934
+ "John Doe"
935
+ """
936
+ cdef Stack stack = Stack(_STACK_SIZE)
937
+ cdef myhtml_tree_node_t * current_node = NULL
938
+ cdef Node next_node
939
+ cdef const char* left_text
940
+ cdef const char* right_text
941
+ cdef char* final_text
942
+ cdef size_t left_length, right_length, final_length
943
+
944
+ stack.push(self.node)
945
+
946
+ while not stack.is_empty():
947
+ current_node = stack.pop()
948
+
949
+ if (current_node.tag_id == MyHTML_TAG__TEXT and current_node.prev and
950
+ current_node.prev.tag_id == MyHTML_TAG__TEXT):
951
+ left_text = myhtml_node_text(current_node.prev, &left_length)
952
+ right_text = myhtml_node_text(current_node, &right_length)
953
+ if left_text and right_text:
954
+ final_length = left_length + right_length
955
+ final_text = <char *>malloc(final_length + 1)
956
+ if final_text == NULL:
957
+ raise MemoryError("Can't allocate memory for a new node.")
958
+ memcpy(final_text, left_text, left_length)
959
+ memcpy(final_text + left_length, right_text, right_length + 1)
960
+ myhtml_node_text_set(current_node, <const char *>final_text, final_length, MyENCODING_UTF_8)
961
+ myhtml_node_delete(current_node.prev)
962
+ free(final_text)
963
+
964
+ if current_node.next is not NULL:
965
+ stack.push(current_node.next)
966
+
967
+ if current_node.child is not NULL:
968
+ stack.push(current_node.child)
969
+
970
+ cdef inline bytes to_bytes(str_or_Node value):
971
+ cdef bytes bytes_val
972
+ if isinstance(value, unicode):
973
+ bytes_val = <bytes>value.encode("utf-8")
974
+ elif isinstance(value, bytes):
975
+ bytes_val = <bytes>value
976
+ return bytes_val