selectolax 0.3.16__cp39-cp39-macosx_10_9_universal2.whl → 0.3.18__cp39-cp39-macosx_10_9_universal2.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/selection.pxi +1 -0
- selectolax/lexbor.c +219 -206
- selectolax/lexbor.cpython-39-darwin.so +0 -0
- selectolax/lexbor.pyx +1 -1
- selectolax/parser.cpython-39-darwin.so +0 -0
- {selectolax-0.3.16.dist-info → selectolax-0.3.18.dist-info}/METADATA +2 -2
- {selectolax-0.3.16.dist-info → selectolax-0.3.18.dist-info}/RECORD +11 -11
- {selectolax-0.3.16.dist-info → selectolax-0.3.18.dist-info}/WHEEL +1 -1
- {selectolax-0.3.16.dist-info → selectolax-0.3.18.dist-info}/LICENSE +0 -0
- {selectolax-0.3.16.dist-info → selectolax-0.3.18.dist-info}/top_level.txt +0 -0
selectolax/lexbor.c
CHANGED
|
@@ -50,7 +50,10 @@
|
|
|
50
50
|
"lexbor/source/lexbor/core/array_obj.c",
|
|
51
51
|
"lexbor/source/lexbor/core/diyfp.c",
|
|
52
52
|
"lexbor/source/lexbor/core/in.c",
|
|
53
|
+
"lexbor/source/lexbor/punycode/punycode.c",
|
|
53
54
|
"lexbor/source/lexbor/ns/ns.c",
|
|
55
|
+
"lexbor/source/lexbor/unicode/unicode.c",
|
|
56
|
+
"lexbor/source/lexbor/unicode/idna.c",
|
|
54
57
|
"lexbor/source/lexbor/css/log.c",
|
|
55
58
|
"lexbor/source/lexbor/css/rule.c",
|
|
56
59
|
"lexbor/source/lexbor/css/css.c",
|
|
@@ -208,6 +211,7 @@
|
|
|
208
211
|
"lexbor/source/lexbor/html/interfaces/data_element.c",
|
|
209
212
|
"lexbor/source/lexbor/html/interfaces/template_element.c",
|
|
210
213
|
"lexbor/source/lexbor/html/interfaces/heading_element.c",
|
|
214
|
+
"lexbor/source/lexbor/url/url.c",
|
|
211
215
|
"lexbor/source/lexbor/dom/interface.c",
|
|
212
216
|
"lexbor/source/lexbor/dom/exception.c",
|
|
213
217
|
"lexbor/source/lexbor/dom/collection.c",
|
|
@@ -1323,7 +1327,7 @@ struct __pyx_obj_10selectolax_6lexbor_TextContainer {
|
|
|
1323
1327
|
};
|
|
1324
1328
|
|
|
1325
1329
|
|
|
1326
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
1330
|
+
/* "selectolax/lexbor/selection.pxi":87
|
|
1327
1331
|
*
|
|
1328
1332
|
*
|
|
1329
1333
|
* cdef class LexborSelector: # <<<<<<<<<<<<<<
|
|
@@ -1487,7 +1491,7 @@ static struct __pyx_vtabstruct_10selectolax_6lexbor_LexborAttributes *__pyx_vtab
|
|
|
1487
1491
|
static struct __pyx_obj_10selectolax_6lexbor_LexborAttributes *__pyx_f_10selectolax_6lexbor_16LexborAttributes_create(lxb_dom_node_t *);
|
|
1488
1492
|
|
|
1489
1493
|
|
|
1490
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
1494
|
+
/* "selectolax/lexbor/selection.pxi":87
|
|
1491
1495
|
*
|
|
1492
1496
|
*
|
|
1493
1497
|
* cdef class LexborSelector: # <<<<<<<<<<<<<<
|
|
@@ -18814,7 +18818,7 @@ static PyObject *__pyx_f_10selectolax_6lexbor_17LexborCSSSelector_any_matches(st
|
|
|
18814
18818
|
* raise SelectolaxError("Can't parse CSS selector.")
|
|
18815
18819
|
* result = bool(self.results) # <<<<<<<<<<<<<<
|
|
18816
18820
|
* self.results = []
|
|
18817
|
-
*
|
|
18821
|
+
* lxb_css_selector_list_destroy_memory(selectors_list)
|
|
18818
18822
|
*/
|
|
18819
18823
|
__pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cpython_4bool_bool), __pyx_v_self->results); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 73, __pyx_L1_error)
|
|
18820
18824
|
__Pyx_GOTREF(__pyx_t_1);
|
|
@@ -18825,8 +18829,8 @@ static PyObject *__pyx_f_10selectolax_6lexbor_17LexborCSSSelector_any_matches(st
|
|
|
18825
18829
|
* raise SelectolaxError("Can't parse CSS selector.")
|
|
18826
18830
|
* result = bool(self.results)
|
|
18827
18831
|
* self.results = [] # <<<<<<<<<<<<<<
|
|
18832
|
+
* lxb_css_selector_list_destroy_memory(selectors_list)
|
|
18828
18833
|
* return result
|
|
18829
|
-
*
|
|
18830
18834
|
*/
|
|
18831
18835
|
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 74, __pyx_L1_error)
|
|
18832
18836
|
__Pyx_GOTREF(__pyx_t_1);
|
|
@@ -18839,6 +18843,15 @@ static PyObject *__pyx_f_10selectolax_6lexbor_17LexborCSSSelector_any_matches(st
|
|
|
18839
18843
|
/* "selectolax/lexbor/selection.pxi":75
|
|
18840
18844
|
* result = bool(self.results)
|
|
18841
18845
|
* self.results = []
|
|
18846
|
+
* lxb_css_selector_list_destroy_memory(selectors_list) # <<<<<<<<<<<<<<
|
|
18847
|
+
* return result
|
|
18848
|
+
*
|
|
18849
|
+
*/
|
|
18850
|
+
lxb_css_selector_list_destroy_memory(__pyx_v_selectors_list);
|
|
18851
|
+
|
|
18852
|
+
/* "selectolax/lexbor/selection.pxi":76
|
|
18853
|
+
* self.results = []
|
|
18854
|
+
* lxb_css_selector_list_destroy_memory(selectors_list)
|
|
18842
18855
|
* return result # <<<<<<<<<<<<<<
|
|
18843
18856
|
*
|
|
18844
18857
|
*
|
|
@@ -18969,7 +18982,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_17LexborCSSSelector_4any_matches(
|
|
|
18969
18982
|
return __pyx_r;
|
|
18970
18983
|
}
|
|
18971
18984
|
|
|
18972
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
18985
|
+
/* "selectolax/lexbor/selection.pxi":79
|
|
18973
18986
|
*
|
|
18974
18987
|
*
|
|
18975
18988
|
* def __dealloc__(self): # <<<<<<<<<<<<<<
|
|
@@ -18992,7 +19005,7 @@ static void __pyx_pf_10selectolax_6lexbor_17LexborCSSSelector_6__dealloc__(struc
|
|
|
18992
19005
|
__Pyx_RefNannyDeclarations
|
|
18993
19006
|
__Pyx_RefNannySetupContext("__dealloc__", 0);
|
|
18994
19007
|
|
|
18995
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19008
|
+
/* "selectolax/lexbor/selection.pxi":80
|
|
18996
19009
|
*
|
|
18997
19010
|
* def __dealloc__(self):
|
|
18998
19011
|
* lxb_selectors_destroy(self.selectors, True) # <<<<<<<<<<<<<<
|
|
@@ -19001,7 +19014,7 @@ static void __pyx_pf_10selectolax_6lexbor_17LexborCSSSelector_6__dealloc__(struc
|
|
|
19001
19014
|
*/
|
|
19002
19015
|
(void)(lxb_selectors_destroy(__pyx_v_self->selectors, 1));
|
|
19003
19016
|
|
|
19004
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19017
|
+
/* "selectolax/lexbor/selection.pxi":81
|
|
19005
19018
|
* def __dealloc__(self):
|
|
19006
19019
|
* lxb_selectors_destroy(self.selectors, True)
|
|
19007
19020
|
* lxb_css_parser_destroy(self.parser, True) # <<<<<<<<<<<<<<
|
|
@@ -19010,7 +19023,7 @@ static void __pyx_pf_10selectolax_6lexbor_17LexborCSSSelector_6__dealloc__(struc
|
|
|
19010
19023
|
*/
|
|
19011
19024
|
(void)(lxb_css_parser_destroy(__pyx_v_self->parser, 1));
|
|
19012
19025
|
|
|
19013
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19026
|
+
/* "selectolax/lexbor/selection.pxi":82
|
|
19014
19027
|
* lxb_selectors_destroy(self.selectors, True)
|
|
19015
19028
|
* lxb_css_parser_destroy(self.parser, True)
|
|
19016
19029
|
* lxb_css_selectors_destroy(self.css_selectors, True) # <<<<<<<<<<<<<<
|
|
@@ -19019,7 +19032,7 @@ static void __pyx_pf_10selectolax_6lexbor_17LexborCSSSelector_6__dealloc__(struc
|
|
|
19019
19032
|
*/
|
|
19020
19033
|
(void)(lxb_css_selectors_destroy(__pyx_v_self->css_selectors, 1));
|
|
19021
19034
|
|
|
19022
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19035
|
+
/* "selectolax/lexbor/selection.pxi":79
|
|
19023
19036
|
*
|
|
19024
19037
|
*
|
|
19025
19038
|
* def __dealloc__(self): # <<<<<<<<<<<<<<
|
|
@@ -19362,7 +19375,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_17LexborCSSSelector_10__setstate_
|
|
|
19362
19375
|
return __pyx_r;
|
|
19363
19376
|
}
|
|
19364
19377
|
|
|
19365
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19378
|
+
/* "selectolax/lexbor/selection.pxi":97
|
|
19366
19379
|
* cdef list nodes
|
|
19367
19380
|
*
|
|
19368
19381
|
* def __init__(self, LexborNode node, query): # <<<<<<<<<<<<<<
|
|
@@ -19404,11 +19417,11 @@ static int __pyx_pw_10selectolax_6lexbor_14LexborSelector_1__init__(PyObject *__
|
|
|
19404
19417
|
case 1:
|
|
19405
19418
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_query)) != 0)) kw_args--;
|
|
19406
19419
|
else {
|
|
19407
|
-
__Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(5,
|
|
19420
|
+
__Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(5, 97, __pyx_L3_error)
|
|
19408
19421
|
}
|
|
19409
19422
|
}
|
|
19410
19423
|
if (unlikely(kw_args > 0)) {
|
|
19411
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(5,
|
|
19424
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(5, 97, __pyx_L3_error)
|
|
19412
19425
|
}
|
|
19413
19426
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
19414
19427
|
goto __pyx_L5_argtuple_error;
|
|
@@ -19421,13 +19434,13 @@ static int __pyx_pw_10selectolax_6lexbor_14LexborSelector_1__init__(PyObject *__
|
|
|
19421
19434
|
}
|
|
19422
19435
|
goto __pyx_L4_argument_unpacking_done;
|
|
19423
19436
|
__pyx_L5_argtuple_error:;
|
|
19424
|
-
__Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5,
|
|
19437
|
+
__Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 97, __pyx_L3_error)
|
|
19425
19438
|
__pyx_L3_error:;
|
|
19426
19439
|
__Pyx_AddTraceback("selectolax.lexbor.LexborSelector.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
19427
19440
|
__Pyx_RefNannyFinishContext();
|
|
19428
19441
|
return -1;
|
|
19429
19442
|
__pyx_L4_argument_unpacking_done:;
|
|
19430
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_10selectolax_6lexbor_LexborNode, 1, "node", 0))) __PYX_ERR(5,
|
|
19443
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_10selectolax_6lexbor_LexborNode, 1, "node", 0))) __PYX_ERR(5, 97, __pyx_L1_error)
|
|
19431
19444
|
__pyx_r = __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(((struct __pyx_obj_10selectolax_6lexbor_LexborSelector *)__pyx_v_self), __pyx_v_node, __pyx_v_query);
|
|
19432
19445
|
|
|
19433
19446
|
/* function exit code */
|
|
@@ -19454,7 +19467,7 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19454
19467
|
int __pyx_clineno = 0;
|
|
19455
19468
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
19456
19469
|
|
|
19457
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19470
|
+
/* "selectolax/lexbor/selection.pxi":98
|
|
19458
19471
|
*
|
|
19459
19472
|
* def __init__(self, LexborNode node, query):
|
|
19460
19473
|
* self.node = node # <<<<<<<<<<<<<<
|
|
@@ -19467,18 +19480,18 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19467
19480
|
__Pyx_DECREF(((PyObject *)__pyx_v_self->node));
|
|
19468
19481
|
__pyx_v_self->node = __pyx_v_node;
|
|
19469
19482
|
|
|
19470
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19483
|
+
/* "selectolax/lexbor/selection.pxi":99
|
|
19471
19484
|
* def __init__(self, LexborNode node, query):
|
|
19472
19485
|
* self.node = node
|
|
19473
19486
|
* self.nodes = self.node.parser.selector.find(query, self.node) if query else [node, ] # <<<<<<<<<<<<<<
|
|
19474
19487
|
*
|
|
19475
19488
|
*
|
|
19476
19489
|
*/
|
|
19477
|
-
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_query); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5,
|
|
19490
|
+
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_query); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5, 99, __pyx_L1_error)
|
|
19478
19491
|
if (__pyx_t_2) {
|
|
19479
|
-
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->node->parser), __pyx_n_s_selector); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
19492
|
+
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->node->parser), __pyx_n_s_selector); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 99, __pyx_L1_error)
|
|
19480
19493
|
__Pyx_GOTREF(__pyx_t_4);
|
|
19481
|
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
19494
|
+
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 99, __pyx_L1_error)
|
|
19482
19495
|
__Pyx_GOTREF(__pyx_t_5);
|
|
19483
19496
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
19484
19497
|
__pyx_t_4 = NULL;
|
|
@@ -19496,7 +19509,7 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19496
19509
|
#if CYTHON_FAST_PYCALL
|
|
19497
19510
|
if (PyFunction_Check(__pyx_t_5)) {
|
|
19498
19511
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_query, ((PyObject *)__pyx_v_self->node)};
|
|
19499
|
-
__pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
19512
|
+
__pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 99, __pyx_L1_error)
|
|
19500
19513
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
19501
19514
|
__Pyx_GOTREF(__pyx_t_3);
|
|
19502
19515
|
} else
|
|
@@ -19504,13 +19517,13 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19504
19517
|
#if CYTHON_FAST_PYCCALL
|
|
19505
19518
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
|
|
19506
19519
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_query, ((PyObject *)__pyx_v_self->node)};
|
|
19507
|
-
__pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
19520
|
+
__pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 99, __pyx_L1_error)
|
|
19508
19521
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
19509
19522
|
__Pyx_GOTREF(__pyx_t_3);
|
|
19510
19523
|
} else
|
|
19511
19524
|
#endif
|
|
19512
19525
|
{
|
|
19513
|
-
__pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5,
|
|
19526
|
+
__pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 99, __pyx_L1_error)
|
|
19514
19527
|
__Pyx_GOTREF(__pyx_t_7);
|
|
19515
19528
|
if (__pyx_t_4) {
|
|
19516
19529
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
@@ -19521,16 +19534,16 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19521
19534
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->node));
|
|
19522
19535
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->node));
|
|
19523
19536
|
PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_self->node));
|
|
19524
|
-
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
19537
|
+
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 99, __pyx_L1_error)
|
|
19525
19538
|
__Pyx_GOTREF(__pyx_t_3);
|
|
19526
19539
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
19527
19540
|
}
|
|
19528
19541
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
19529
|
-
if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(5,
|
|
19542
|
+
if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(5, 99, __pyx_L1_error)
|
|
19530
19543
|
__pyx_t_1 = __pyx_t_3;
|
|
19531
19544
|
__pyx_t_3 = 0;
|
|
19532
19545
|
} else {
|
|
19533
|
-
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
19546
|
+
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 99, __pyx_L1_error)
|
|
19534
19547
|
__Pyx_GOTREF(__pyx_t_3);
|
|
19535
19548
|
__Pyx_INCREF(((PyObject *)__pyx_v_node));
|
|
19536
19549
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_node));
|
|
@@ -19544,7 +19557,7 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19544
19557
|
__pyx_v_self->nodes = ((PyObject*)__pyx_t_1);
|
|
19545
19558
|
__pyx_t_1 = 0;
|
|
19546
19559
|
|
|
19547
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19560
|
+
/* "selectolax/lexbor/selection.pxi":97
|
|
19548
19561
|
* cdef list nodes
|
|
19549
19562
|
*
|
|
19550
19563
|
* def __init__(self, LexborNode node, query): # <<<<<<<<<<<<<<
|
|
@@ -19568,7 +19581,7 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19568
19581
|
return __pyx_r;
|
|
19569
19582
|
}
|
|
19570
19583
|
|
|
19571
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19584
|
+
/* "selectolax/lexbor/selection.pxi":102
|
|
19572
19585
|
*
|
|
19573
19586
|
*
|
|
19574
19587
|
* cpdef css(self, str query): # <<<<<<<<<<<<<<
|
|
@@ -19597,7 +19610,7 @@ static PyObject *__pyx_f_10selectolax_6lexbor_14LexborSelector_css(CYTHON_UNUSED
|
|
|
19597
19610
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
19598
19611
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
19599
19612
|
#endif
|
|
19600
|
-
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_css); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
19613
|
+
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_css); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 102, __pyx_L1_error)
|
|
19601
19614
|
__Pyx_GOTREF(__pyx_t_1);
|
|
19602
19615
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_10selectolax_6lexbor_14LexborSelector_3css)) {
|
|
19603
19616
|
__Pyx_XDECREF(__pyx_r);
|
|
@@ -19614,7 +19627,7 @@ static PyObject *__pyx_f_10selectolax_6lexbor_14LexborSelector_css(CYTHON_UNUSED
|
|
|
19614
19627
|
}
|
|
19615
19628
|
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_query) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_query);
|
|
19616
19629
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
19617
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(5,
|
|
19630
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 102, __pyx_L1_error)
|
|
19618
19631
|
__Pyx_GOTREF(__pyx_t_2);
|
|
19619
19632
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
19620
19633
|
__pyx_r = __pyx_t_2;
|
|
@@ -19635,14 +19648,14 @@ static PyObject *__pyx_f_10selectolax_6lexbor_14LexborSelector_css(CYTHON_UNUSED
|
|
|
19635
19648
|
#endif
|
|
19636
19649
|
}
|
|
19637
19650
|
|
|
19638
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19651
|
+
/* "selectolax/lexbor/selection.pxi":104
|
|
19639
19652
|
* cpdef css(self, str query):
|
|
19640
19653
|
* """Evaluate CSS selector against current scope."""
|
|
19641
19654
|
* raise SelectolaxError("This features is not supported by the lexbor backend. Please use Modest backend.") # <<<<<<<<<<<<<<
|
|
19642
19655
|
*
|
|
19643
19656
|
* @property
|
|
19644
19657
|
*/
|
|
19645
|
-
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SelectolaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(5,
|
|
19658
|
+
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SelectolaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 104, __pyx_L1_error)
|
|
19646
19659
|
__Pyx_GOTREF(__pyx_t_2);
|
|
19647
19660
|
__pyx_t_3 = NULL;
|
|
19648
19661
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
@@ -19656,14 +19669,14 @@ static PyObject *__pyx_f_10selectolax_6lexbor_14LexborSelector_css(CYTHON_UNUSED
|
|
|
19656
19669
|
}
|
|
19657
19670
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_This_features_is_not_supported_b) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_This_features_is_not_supported_b);
|
|
19658
19671
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
19659
|
-
if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
19672
|
+
if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 104, __pyx_L1_error)
|
|
19660
19673
|
__Pyx_GOTREF(__pyx_t_1);
|
|
19661
19674
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
19662
19675
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
19663
19676
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
19664
|
-
__PYX_ERR(5,
|
|
19677
|
+
__PYX_ERR(5, 104, __pyx_L1_error)
|
|
19665
19678
|
|
|
19666
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19679
|
+
/* "selectolax/lexbor/selection.pxi":102
|
|
19667
19680
|
*
|
|
19668
19681
|
*
|
|
19669
19682
|
* cpdef css(self, str query): # <<<<<<<<<<<<<<
|
|
@@ -19695,7 +19708,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_3css(PyObject *_
|
|
|
19695
19708
|
PyObject *__pyx_r = 0;
|
|
19696
19709
|
__Pyx_RefNannyDeclarations
|
|
19697
19710
|
__Pyx_RefNannySetupContext("css (wrapper)", 0);
|
|
19698
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_query), (&PyUnicode_Type), 1, "query", 1))) __PYX_ERR(5,
|
|
19711
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_query), (&PyUnicode_Type), 1, "query", 1))) __PYX_ERR(5, 102, __pyx_L1_error)
|
|
19699
19712
|
__pyx_r = __pyx_pf_10selectolax_6lexbor_14LexborSelector_2css(((struct __pyx_obj_10selectolax_6lexbor_LexborSelector *)__pyx_v_self), ((PyObject*)__pyx_v_query));
|
|
19700
19713
|
|
|
19701
19714
|
/* function exit code */
|
|
@@ -19716,7 +19729,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_2css(struct __py
|
|
|
19716
19729
|
int __pyx_clineno = 0;
|
|
19717
19730
|
__Pyx_RefNannySetupContext("css", 0);
|
|
19718
19731
|
__Pyx_XDECREF(__pyx_r);
|
|
19719
|
-
__pyx_t_1 = __pyx_f_10selectolax_6lexbor_14LexborSelector_css(__pyx_v_self, __pyx_v_query, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
19732
|
+
__pyx_t_1 = __pyx_f_10selectolax_6lexbor_14LexborSelector_css(__pyx_v_self, __pyx_v_query, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 102, __pyx_L1_error)
|
|
19720
19733
|
__Pyx_GOTREF(__pyx_t_1);
|
|
19721
19734
|
__pyx_r = __pyx_t_1;
|
|
19722
19735
|
__pyx_t_1 = 0;
|
|
@@ -19733,7 +19746,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_2css(struct __py
|
|
|
19733
19746
|
return __pyx_r;
|
|
19734
19747
|
}
|
|
19735
19748
|
|
|
19736
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19749
|
+
/* "selectolax/lexbor/selection.pxi":107
|
|
19737
19750
|
*
|
|
19738
19751
|
* @property
|
|
19739
19752
|
* def matches(self): # <<<<<<<<<<<<<<
|
|
@@ -19759,7 +19772,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_7matches___get__
|
|
|
19759
19772
|
__Pyx_RefNannyDeclarations
|
|
19760
19773
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
19761
19774
|
|
|
19762
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19775
|
+
/* "selectolax/lexbor/selection.pxi":109
|
|
19763
19776
|
* def matches(self):
|
|
19764
19777
|
* """Returns all possible matches"""
|
|
19765
19778
|
* return self.nodes # <<<<<<<<<<<<<<
|
|
@@ -19771,7 +19784,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_7matches___get__
|
|
|
19771
19784
|
__pyx_r = __pyx_v_self->nodes;
|
|
19772
19785
|
goto __pyx_L0;
|
|
19773
19786
|
|
|
19774
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19787
|
+
/* "selectolax/lexbor/selection.pxi":107
|
|
19775
19788
|
*
|
|
19776
19789
|
* @property
|
|
19777
19790
|
* def matches(self): # <<<<<<<<<<<<<<
|
|
@@ -19786,7 +19799,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_7matches___get__
|
|
|
19786
19799
|
return __pyx_r;
|
|
19787
19800
|
}
|
|
19788
19801
|
|
|
19789
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19802
|
+
/* "selectolax/lexbor/selection.pxi":112
|
|
19790
19803
|
*
|
|
19791
19804
|
* @property
|
|
19792
19805
|
* def any_matches(self): # <<<<<<<<<<<<<<
|
|
@@ -19816,7 +19829,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_11any_matches___
|
|
|
19816
19829
|
int __pyx_clineno = 0;
|
|
19817
19830
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
19818
19831
|
|
|
19819
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19832
|
+
/* "selectolax/lexbor/selection.pxi":114
|
|
19820
19833
|
* def any_matches(self):
|
|
19821
19834
|
* """Returns True if there are any matches"""
|
|
19822
19835
|
* return bool(self.nodes) # <<<<<<<<<<<<<<
|
|
@@ -19824,13 +19837,13 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_11any_matches___
|
|
|
19824
19837
|
* def text_contains(self, str text, bool deep=True, str separator='', bool strip=False):
|
|
19825
19838
|
*/
|
|
19826
19839
|
__Pyx_XDECREF(__pyx_r);
|
|
19827
|
-
__pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cpython_4bool_bool), __pyx_v_self->nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
19840
|
+
__pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cpython_4bool_bool), __pyx_v_self->nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 114, __pyx_L1_error)
|
|
19828
19841
|
__Pyx_GOTREF(__pyx_t_1);
|
|
19829
19842
|
__pyx_r = __pyx_t_1;
|
|
19830
19843
|
__pyx_t_1 = 0;
|
|
19831
19844
|
goto __pyx_L0;
|
|
19832
19845
|
|
|
19833
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19846
|
+
/* "selectolax/lexbor/selection.pxi":112
|
|
19834
19847
|
*
|
|
19835
19848
|
* @property
|
|
19836
19849
|
* def any_matches(self): # <<<<<<<<<<<<<<
|
|
@@ -19849,7 +19862,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_11any_matches___
|
|
|
19849
19862
|
return __pyx_r;
|
|
19850
19863
|
}
|
|
19851
19864
|
|
|
19852
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19865
|
+
/* "selectolax/lexbor/selection.pxi":116
|
|
19853
19866
|
* return bool(self.nodes)
|
|
19854
19867
|
*
|
|
19855
19868
|
* def text_contains(self, str text, bool deep=True, str separator='', bool strip=False): # <<<<<<<<<<<<<<
|
|
@@ -19917,7 +19930,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_5text_contains(P
|
|
|
19917
19930
|
}
|
|
19918
19931
|
}
|
|
19919
19932
|
if (unlikely(kw_args > 0)) {
|
|
19920
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "text_contains") < 0)) __PYX_ERR(5,
|
|
19933
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "text_contains") < 0)) __PYX_ERR(5, 116, __pyx_L3_error)
|
|
19921
19934
|
}
|
|
19922
19935
|
} else {
|
|
19923
19936
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
@@ -19939,16 +19952,16 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_5text_contains(P
|
|
|
19939
19952
|
}
|
|
19940
19953
|
goto __pyx_L4_argument_unpacking_done;
|
|
19941
19954
|
__pyx_L5_argtuple_error:;
|
|
19942
|
-
__Pyx_RaiseArgtupleInvalid("text_contains", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5,
|
|
19955
|
+
__Pyx_RaiseArgtupleInvalid("text_contains", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 116, __pyx_L3_error)
|
|
19943
19956
|
__pyx_L3_error:;
|
|
19944
19957
|
__Pyx_AddTraceback("selectolax.lexbor.LexborSelector.text_contains", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
19945
19958
|
__Pyx_RefNannyFinishContext();
|
|
19946
19959
|
return NULL;
|
|
19947
19960
|
__pyx_L4_argument_unpacking_done:;
|
|
19948
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyUnicode_Type), 1, "text", 1))) __PYX_ERR(5,
|
|
19949
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_deep), __pyx_ptype_7cpython_4bool_bool, 1, "deep", 0))) __PYX_ERR(5,
|
|
19950
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_separator), (&PyUnicode_Type), 1, "separator", 1))) __PYX_ERR(5,
|
|
19951
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strip), __pyx_ptype_7cpython_4bool_bool, 1, "strip", 0))) __PYX_ERR(5,
|
|
19961
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyUnicode_Type), 1, "text", 1))) __PYX_ERR(5, 116, __pyx_L1_error)
|
|
19962
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_deep), __pyx_ptype_7cpython_4bool_bool, 1, "deep", 0))) __PYX_ERR(5, 116, __pyx_L1_error)
|
|
19963
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_separator), (&PyUnicode_Type), 1, "separator", 1))) __PYX_ERR(5, 116, __pyx_L1_error)
|
|
19964
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strip), __pyx_ptype_7cpython_4bool_bool, 1, "strip", 0))) __PYX_ERR(5, 116, __pyx_L1_error)
|
|
19952
19965
|
__pyx_r = __pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(((struct __pyx_obj_10selectolax_6lexbor_LexborSelector *)__pyx_v_self), __pyx_v_text, __pyx_v_deep, __pyx_v_separator, __pyx_v_strip);
|
|
19953
19966
|
|
|
19954
19967
|
/* function exit code */
|
|
@@ -19980,19 +19993,19 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
19980
19993
|
int __pyx_clineno = 0;
|
|
19981
19994
|
__Pyx_RefNannySetupContext("text_contains", 0);
|
|
19982
19995
|
|
|
19983
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19996
|
+
/* "selectolax/lexbor/selection.pxi":118
|
|
19984
19997
|
* def text_contains(self, str text, bool deep=True, str separator='', bool strip=False):
|
|
19985
19998
|
* """Filter all current matches given text."""
|
|
19986
19999
|
* nodes = [] # <<<<<<<<<<<<<<
|
|
19987
20000
|
* for node in self.nodes:
|
|
19988
20001
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
19989
20002
|
*/
|
|
19990
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
20003
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 118, __pyx_L1_error)
|
|
19991
20004
|
__Pyx_GOTREF(__pyx_t_1);
|
|
19992
20005
|
__pyx_v_nodes = ((PyObject*)__pyx_t_1);
|
|
19993
20006
|
__pyx_t_1 = 0;
|
|
19994
20007
|
|
|
19995
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20008
|
+
/* "selectolax/lexbor/selection.pxi":119
|
|
19996
20009
|
* """Filter all current matches given text."""
|
|
19997
20010
|
* nodes = []
|
|
19998
20011
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -20001,70 +20014,70 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
20001
20014
|
*/
|
|
20002
20015
|
if (unlikely(__pyx_v_self->nodes == Py_None)) {
|
|
20003
20016
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
20004
|
-
__PYX_ERR(5,
|
|
20017
|
+
__PYX_ERR(5, 119, __pyx_L1_error)
|
|
20005
20018
|
}
|
|
20006
20019
|
__pyx_t_1 = __pyx_v_self->nodes; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
|
|
20007
20020
|
for (;;) {
|
|
20008
20021
|
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
|
|
20009
20022
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
20010
|
-
__pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(5,
|
|
20023
|
+
__pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(5, 119, __pyx_L1_error)
|
|
20011
20024
|
#else
|
|
20012
|
-
__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20025
|
+
__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 119, __pyx_L1_error)
|
|
20013
20026
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20014
20027
|
#endif
|
|
20015
20028
|
__Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_3);
|
|
20016
20029
|
__pyx_t_3 = 0;
|
|
20017
20030
|
|
|
20018
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20031
|
+
/* "selectolax/lexbor/selection.pxi":120
|
|
20019
20032
|
* nodes = []
|
|
20020
20033
|
* for node in self.nodes:
|
|
20021
20034
|
* node_text = node.text(deep=deep, separator=separator, strip=strip) # <<<<<<<<<<<<<<
|
|
20022
20035
|
* if node_text and text in node_text:
|
|
20023
20036
|
* nodes.append(node)
|
|
20024
20037
|
*/
|
|
20025
|
-
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20038
|
+
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 120, __pyx_L1_error)
|
|
20026
20039
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20027
|
-
__pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
20040
|
+
__pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 120, __pyx_L1_error)
|
|
20028
20041
|
__Pyx_GOTREF(__pyx_t_4);
|
|
20029
|
-
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_deep, ((PyObject *)__pyx_v_deep)) < 0) __PYX_ERR(5,
|
|
20030
|
-
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_separator, __pyx_v_separator) < 0) __PYX_ERR(5,
|
|
20031
|
-
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_strip, ((PyObject *)__pyx_v_strip)) < 0) __PYX_ERR(5,
|
|
20032
|
-
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20042
|
+
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_deep, ((PyObject *)__pyx_v_deep)) < 0) __PYX_ERR(5, 120, __pyx_L1_error)
|
|
20043
|
+
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_separator, __pyx_v_separator) < 0) __PYX_ERR(5, 120, __pyx_L1_error)
|
|
20044
|
+
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_strip, ((PyObject *)__pyx_v_strip)) < 0) __PYX_ERR(5, 120, __pyx_L1_error)
|
|
20045
|
+
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 120, __pyx_L1_error)
|
|
20033
20046
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20034
20047
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
20035
20048
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20036
20049
|
__Pyx_XDECREF_SET(__pyx_v_node_text, __pyx_t_5);
|
|
20037
20050
|
__pyx_t_5 = 0;
|
|
20038
20051
|
|
|
20039
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20052
|
+
/* "selectolax/lexbor/selection.pxi":121
|
|
20040
20053
|
* for node in self.nodes:
|
|
20041
20054
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20042
20055
|
* if node_text and text in node_text: # <<<<<<<<<<<<<<
|
|
20043
20056
|
* nodes.append(node)
|
|
20044
20057
|
* self.nodes = nodes
|
|
20045
20058
|
*/
|
|
20046
|
-
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_node_text); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20059
|
+
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_node_text); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5, 121, __pyx_L1_error)
|
|
20047
20060
|
if (__pyx_t_7) {
|
|
20048
20061
|
} else {
|
|
20049
20062
|
__pyx_t_6 = __pyx_t_7;
|
|
20050
20063
|
goto __pyx_L6_bool_binop_done;
|
|
20051
20064
|
}
|
|
20052
|
-
__pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_text, __pyx_v_node_text, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20065
|
+
__pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_text, __pyx_v_node_text, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5, 121, __pyx_L1_error)
|
|
20053
20066
|
__pyx_t_8 = (__pyx_t_7 != 0);
|
|
20054
20067
|
__pyx_t_6 = __pyx_t_8;
|
|
20055
20068
|
__pyx_L6_bool_binop_done:;
|
|
20056
20069
|
if (__pyx_t_6) {
|
|
20057
20070
|
|
|
20058
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20071
|
+
/* "selectolax/lexbor/selection.pxi":122
|
|
20059
20072
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20060
20073
|
* if node_text and text in node_text:
|
|
20061
20074
|
* nodes.append(node) # <<<<<<<<<<<<<<
|
|
20062
20075
|
* self.nodes = nodes
|
|
20063
20076
|
* return self
|
|
20064
20077
|
*/
|
|
20065
|
-
__pyx_t_9 = __Pyx_PyList_Append(__pyx_v_nodes, __pyx_v_node); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5,
|
|
20078
|
+
__pyx_t_9 = __Pyx_PyList_Append(__pyx_v_nodes, __pyx_v_node); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 122, __pyx_L1_error)
|
|
20066
20079
|
|
|
20067
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20080
|
+
/* "selectolax/lexbor/selection.pxi":121
|
|
20068
20081
|
* for node in self.nodes:
|
|
20069
20082
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20070
20083
|
* if node_text and text in node_text: # <<<<<<<<<<<<<<
|
|
@@ -20073,7 +20086,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
20073
20086
|
*/
|
|
20074
20087
|
}
|
|
20075
20088
|
|
|
20076
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20089
|
+
/* "selectolax/lexbor/selection.pxi":119
|
|
20077
20090
|
* """Filter all current matches given text."""
|
|
20078
20091
|
* nodes = []
|
|
20079
20092
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -20083,7 +20096,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
20083
20096
|
}
|
|
20084
20097
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
20085
20098
|
|
|
20086
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20099
|
+
/* "selectolax/lexbor/selection.pxi":123
|
|
20087
20100
|
* if node_text and text in node_text:
|
|
20088
20101
|
* nodes.append(node)
|
|
20089
20102
|
* self.nodes = nodes # <<<<<<<<<<<<<<
|
|
@@ -20096,7 +20109,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
20096
20109
|
__Pyx_DECREF(__pyx_v_self->nodes);
|
|
20097
20110
|
__pyx_v_self->nodes = __pyx_v_nodes;
|
|
20098
20111
|
|
|
20099
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20112
|
+
/* "selectolax/lexbor/selection.pxi":124
|
|
20100
20113
|
* nodes.append(node)
|
|
20101
20114
|
* self.nodes = nodes
|
|
20102
20115
|
* return self # <<<<<<<<<<<<<<
|
|
@@ -20108,7 +20121,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
20108
20121
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
20109
20122
|
goto __pyx_L0;
|
|
20110
20123
|
|
|
20111
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20124
|
+
/* "selectolax/lexbor/selection.pxi":116
|
|
20112
20125
|
* return bool(self.nodes)
|
|
20113
20126
|
*
|
|
20114
20127
|
* def text_contains(self, str text, bool deep=True, str separator='', bool strip=False): # <<<<<<<<<<<<<<
|
|
@@ -20133,7 +20146,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
20133
20146
|
return __pyx_r;
|
|
20134
20147
|
}
|
|
20135
20148
|
|
|
20136
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20149
|
+
/* "selectolax/lexbor/selection.pxi":126
|
|
20137
20150
|
* return self
|
|
20138
20151
|
*
|
|
20139
20152
|
* def any_text_contains(self, str text, bool deep=True, str separator='', bool strip=False): # <<<<<<<<<<<<<<
|
|
@@ -20201,7 +20214,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_7any_text_contai
|
|
|
20201
20214
|
}
|
|
20202
20215
|
}
|
|
20203
20216
|
if (unlikely(kw_args > 0)) {
|
|
20204
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "any_text_contains") < 0)) __PYX_ERR(5,
|
|
20217
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "any_text_contains") < 0)) __PYX_ERR(5, 126, __pyx_L3_error)
|
|
20205
20218
|
}
|
|
20206
20219
|
} else {
|
|
20207
20220
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
@@ -20223,16 +20236,16 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_7any_text_contai
|
|
|
20223
20236
|
}
|
|
20224
20237
|
goto __pyx_L4_argument_unpacking_done;
|
|
20225
20238
|
__pyx_L5_argtuple_error:;
|
|
20226
|
-
__Pyx_RaiseArgtupleInvalid("any_text_contains", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5,
|
|
20239
|
+
__Pyx_RaiseArgtupleInvalid("any_text_contains", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 126, __pyx_L3_error)
|
|
20227
20240
|
__pyx_L3_error:;
|
|
20228
20241
|
__Pyx_AddTraceback("selectolax.lexbor.LexborSelector.any_text_contains", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
20229
20242
|
__Pyx_RefNannyFinishContext();
|
|
20230
20243
|
return NULL;
|
|
20231
20244
|
__pyx_L4_argument_unpacking_done:;
|
|
20232
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyUnicode_Type), 1, "text", 1))) __PYX_ERR(5,
|
|
20233
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_deep), __pyx_ptype_7cpython_4bool_bool, 1, "deep", 0))) __PYX_ERR(5,
|
|
20234
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_separator), (&PyUnicode_Type), 1, "separator", 1))) __PYX_ERR(5,
|
|
20235
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strip), __pyx_ptype_7cpython_4bool_bool, 1, "strip", 0))) __PYX_ERR(5,
|
|
20245
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyUnicode_Type), 1, "text", 1))) __PYX_ERR(5, 126, __pyx_L1_error)
|
|
20246
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_deep), __pyx_ptype_7cpython_4bool_bool, 1, "deep", 0))) __PYX_ERR(5, 126, __pyx_L1_error)
|
|
20247
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_separator), (&PyUnicode_Type), 1, "separator", 1))) __PYX_ERR(5, 126, __pyx_L1_error)
|
|
20248
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strip), __pyx_ptype_7cpython_4bool_bool, 1, "strip", 0))) __PYX_ERR(5, 126, __pyx_L1_error)
|
|
20236
20249
|
__pyx_r = __pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contains(((struct __pyx_obj_10selectolax_6lexbor_LexborSelector *)__pyx_v_self), __pyx_v_text, __pyx_v_deep, __pyx_v_separator, __pyx_v_strip);
|
|
20237
20250
|
|
|
20238
20251
|
/* function exit code */
|
|
@@ -20263,19 +20276,19 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20263
20276
|
int __pyx_clineno = 0;
|
|
20264
20277
|
__Pyx_RefNannySetupContext("any_text_contains", 0);
|
|
20265
20278
|
|
|
20266
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20279
|
+
/* "selectolax/lexbor/selection.pxi":128
|
|
20267
20280
|
* def any_text_contains(self, str text, bool deep=True, str separator='', bool strip=False):
|
|
20268
20281
|
* """Returns True if any node in the current search scope contains specified text"""
|
|
20269
20282
|
* nodes = [] # <<<<<<<<<<<<<<
|
|
20270
20283
|
* for node in self.nodes:
|
|
20271
20284
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20272
20285
|
*/
|
|
20273
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
20286
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 128, __pyx_L1_error)
|
|
20274
20287
|
__Pyx_GOTREF(__pyx_t_1);
|
|
20275
20288
|
__pyx_v_nodes = ((PyObject*)__pyx_t_1);
|
|
20276
20289
|
__pyx_t_1 = 0;
|
|
20277
20290
|
|
|
20278
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20291
|
+
/* "selectolax/lexbor/selection.pxi":129
|
|
20279
20292
|
* """Returns True if any node in the current search scope contains specified text"""
|
|
20280
20293
|
* nodes = []
|
|
20281
20294
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -20284,61 +20297,61 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20284
20297
|
*/
|
|
20285
20298
|
if (unlikely(__pyx_v_self->nodes == Py_None)) {
|
|
20286
20299
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
20287
|
-
__PYX_ERR(5,
|
|
20300
|
+
__PYX_ERR(5, 129, __pyx_L1_error)
|
|
20288
20301
|
}
|
|
20289
20302
|
__pyx_t_1 = __pyx_v_self->nodes; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
|
|
20290
20303
|
for (;;) {
|
|
20291
20304
|
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
|
|
20292
20305
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
20293
|
-
__pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(5,
|
|
20306
|
+
__pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(5, 129, __pyx_L1_error)
|
|
20294
20307
|
#else
|
|
20295
|
-
__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20308
|
+
__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 129, __pyx_L1_error)
|
|
20296
20309
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20297
20310
|
#endif
|
|
20298
20311
|
__Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_3);
|
|
20299
20312
|
__pyx_t_3 = 0;
|
|
20300
20313
|
|
|
20301
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20314
|
+
/* "selectolax/lexbor/selection.pxi":130
|
|
20302
20315
|
* nodes = []
|
|
20303
20316
|
* for node in self.nodes:
|
|
20304
20317
|
* node_text = node.text(deep=deep, separator=separator, strip=strip) # <<<<<<<<<<<<<<
|
|
20305
20318
|
* if node_text and text in node_text:
|
|
20306
20319
|
* return True
|
|
20307
20320
|
*/
|
|
20308
|
-
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20321
|
+
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 130, __pyx_L1_error)
|
|
20309
20322
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20310
|
-
__pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
20323
|
+
__pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 130, __pyx_L1_error)
|
|
20311
20324
|
__Pyx_GOTREF(__pyx_t_4);
|
|
20312
|
-
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_deep, ((PyObject *)__pyx_v_deep)) < 0) __PYX_ERR(5,
|
|
20313
|
-
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_separator, __pyx_v_separator) < 0) __PYX_ERR(5,
|
|
20314
|
-
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_strip, ((PyObject *)__pyx_v_strip)) < 0) __PYX_ERR(5,
|
|
20315
|
-
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20325
|
+
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_deep, ((PyObject *)__pyx_v_deep)) < 0) __PYX_ERR(5, 130, __pyx_L1_error)
|
|
20326
|
+
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_separator, __pyx_v_separator) < 0) __PYX_ERR(5, 130, __pyx_L1_error)
|
|
20327
|
+
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_strip, ((PyObject *)__pyx_v_strip)) < 0) __PYX_ERR(5, 130, __pyx_L1_error)
|
|
20328
|
+
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 130, __pyx_L1_error)
|
|
20316
20329
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20317
20330
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
20318
20331
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20319
20332
|
__Pyx_XDECREF_SET(__pyx_v_node_text, __pyx_t_5);
|
|
20320
20333
|
__pyx_t_5 = 0;
|
|
20321
20334
|
|
|
20322
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20335
|
+
/* "selectolax/lexbor/selection.pxi":131
|
|
20323
20336
|
* for node in self.nodes:
|
|
20324
20337
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20325
20338
|
* if node_text and text in node_text: # <<<<<<<<<<<<<<
|
|
20326
20339
|
* return True
|
|
20327
20340
|
* return False
|
|
20328
20341
|
*/
|
|
20329
|
-
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_node_text); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20342
|
+
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_node_text); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5, 131, __pyx_L1_error)
|
|
20330
20343
|
if (__pyx_t_7) {
|
|
20331
20344
|
} else {
|
|
20332
20345
|
__pyx_t_6 = __pyx_t_7;
|
|
20333
20346
|
goto __pyx_L6_bool_binop_done;
|
|
20334
20347
|
}
|
|
20335
|
-
__pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_text, __pyx_v_node_text, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20348
|
+
__pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_text, __pyx_v_node_text, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5, 131, __pyx_L1_error)
|
|
20336
20349
|
__pyx_t_8 = (__pyx_t_7 != 0);
|
|
20337
20350
|
__pyx_t_6 = __pyx_t_8;
|
|
20338
20351
|
__pyx_L6_bool_binop_done:;
|
|
20339
20352
|
if (__pyx_t_6) {
|
|
20340
20353
|
|
|
20341
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20354
|
+
/* "selectolax/lexbor/selection.pxi":132
|
|
20342
20355
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20343
20356
|
* if node_text and text in node_text:
|
|
20344
20357
|
* return True # <<<<<<<<<<<<<<
|
|
@@ -20351,7 +20364,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20351
20364
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
20352
20365
|
goto __pyx_L0;
|
|
20353
20366
|
|
|
20354
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20367
|
+
/* "selectolax/lexbor/selection.pxi":131
|
|
20355
20368
|
* for node in self.nodes:
|
|
20356
20369
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20357
20370
|
* if node_text and text in node_text: # <<<<<<<<<<<<<<
|
|
@@ -20360,7 +20373,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20360
20373
|
*/
|
|
20361
20374
|
}
|
|
20362
20375
|
|
|
20363
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20376
|
+
/* "selectolax/lexbor/selection.pxi":129
|
|
20364
20377
|
* """Returns True if any node in the current search scope contains specified text"""
|
|
20365
20378
|
* nodes = []
|
|
20366
20379
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -20370,7 +20383,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20370
20383
|
}
|
|
20371
20384
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
20372
20385
|
|
|
20373
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20386
|
+
/* "selectolax/lexbor/selection.pxi":133
|
|
20374
20387
|
* if node_text and text in node_text:
|
|
20375
20388
|
* return True
|
|
20376
20389
|
* return False # <<<<<<<<<<<<<<
|
|
@@ -20382,7 +20395,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20382
20395
|
__pyx_r = Py_False;
|
|
20383
20396
|
goto __pyx_L0;
|
|
20384
20397
|
|
|
20385
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20398
|
+
/* "selectolax/lexbor/selection.pxi":126
|
|
20386
20399
|
* return self
|
|
20387
20400
|
*
|
|
20388
20401
|
* def any_text_contains(self, str text, bool deep=True, str separator='', bool strip=False): # <<<<<<<<<<<<<<
|
|
@@ -20407,7 +20420,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20407
20420
|
return __pyx_r;
|
|
20408
20421
|
}
|
|
20409
20422
|
|
|
20410
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20423
|
+
/* "selectolax/lexbor/selection.pxi":135
|
|
20411
20424
|
* return False
|
|
20412
20425
|
*
|
|
20413
20426
|
* def attribute_longer_than(self, str attribute, int length, str start = None): # <<<<<<<<<<<<<<
|
|
@@ -20454,7 +20467,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_9attribute_longe
|
|
|
20454
20467
|
case 1:
|
|
20455
20468
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--;
|
|
20456
20469
|
else {
|
|
20457
|
-
__Pyx_RaiseArgtupleInvalid("attribute_longer_than", 0, 2, 3, 1); __PYX_ERR(5,
|
|
20470
|
+
__Pyx_RaiseArgtupleInvalid("attribute_longer_than", 0, 2, 3, 1); __PYX_ERR(5, 135, __pyx_L3_error)
|
|
20458
20471
|
}
|
|
20459
20472
|
CYTHON_FALLTHROUGH;
|
|
20460
20473
|
case 2:
|
|
@@ -20464,7 +20477,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_9attribute_longe
|
|
|
20464
20477
|
}
|
|
20465
20478
|
}
|
|
20466
20479
|
if (unlikely(kw_args > 0)) {
|
|
20467
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "attribute_longer_than") < 0)) __PYX_ERR(5,
|
|
20480
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "attribute_longer_than") < 0)) __PYX_ERR(5, 135, __pyx_L3_error)
|
|
20468
20481
|
}
|
|
20469
20482
|
} else {
|
|
20470
20483
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
@@ -20477,19 +20490,19 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_9attribute_longe
|
|
|
20477
20490
|
}
|
|
20478
20491
|
}
|
|
20479
20492
|
__pyx_v_attribute = ((PyObject*)values[0]);
|
|
20480
|
-
__pyx_v_length = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(5,
|
|
20493
|
+
__pyx_v_length = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 135, __pyx_L3_error)
|
|
20481
20494
|
__pyx_v_start = ((PyObject*)values[2]);
|
|
20482
20495
|
}
|
|
20483
20496
|
goto __pyx_L4_argument_unpacking_done;
|
|
20484
20497
|
__pyx_L5_argtuple_error:;
|
|
20485
|
-
__Pyx_RaiseArgtupleInvalid("attribute_longer_than", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5,
|
|
20498
|
+
__Pyx_RaiseArgtupleInvalid("attribute_longer_than", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 135, __pyx_L3_error)
|
|
20486
20499
|
__pyx_L3_error:;
|
|
20487
20500
|
__Pyx_AddTraceback("selectolax.lexbor.LexborSelector.attribute_longer_than", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
20488
20501
|
__Pyx_RefNannyFinishContext();
|
|
20489
20502
|
return NULL;
|
|
20490
20503
|
__pyx_L4_argument_unpacking_done:;
|
|
20491
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute), (&PyUnicode_Type), 1, "attribute", 1))) __PYX_ERR(5,
|
|
20492
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), (&PyUnicode_Type), 1, "start", 1))) __PYX_ERR(5,
|
|
20504
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute), (&PyUnicode_Type), 1, "attribute", 1))) __PYX_ERR(5, 135, __pyx_L1_error)
|
|
20505
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), (&PyUnicode_Type), 1, "start", 1))) __PYX_ERR(5, 135, __pyx_L1_error)
|
|
20493
20506
|
__pyx_r = __pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longer_than(((struct __pyx_obj_10selectolax_6lexbor_LexborSelector *)__pyx_v_self), __pyx_v_attribute, __pyx_v_length, __pyx_v_start);
|
|
20494
20507
|
|
|
20495
20508
|
/* function exit code */
|
|
@@ -20522,19 +20535,19 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20522
20535
|
int __pyx_clineno = 0;
|
|
20523
20536
|
__Pyx_RefNannySetupContext("attribute_longer_than", 0);
|
|
20524
20537
|
|
|
20525
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20538
|
+
/* "selectolax/lexbor/selection.pxi":140
|
|
20526
20539
|
* Similar to `string-length` in XPath.
|
|
20527
20540
|
* """
|
|
20528
20541
|
* nodes = [] # <<<<<<<<<<<<<<
|
|
20529
20542
|
* for node in self.nodes:
|
|
20530
20543
|
* attr = node.attributes.get(attribute)
|
|
20531
20544
|
*/
|
|
20532
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
20545
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 140, __pyx_L1_error)
|
|
20533
20546
|
__Pyx_GOTREF(__pyx_t_1);
|
|
20534
20547
|
__pyx_v_nodes = ((PyObject*)__pyx_t_1);
|
|
20535
20548
|
__pyx_t_1 = 0;
|
|
20536
20549
|
|
|
20537
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20550
|
+
/* "selectolax/lexbor/selection.pxi":141
|
|
20538
20551
|
* """
|
|
20539
20552
|
* nodes = []
|
|
20540
20553
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -20543,30 +20556,30 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20543
20556
|
*/
|
|
20544
20557
|
if (unlikely(__pyx_v_self->nodes == Py_None)) {
|
|
20545
20558
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
20546
|
-
__PYX_ERR(5,
|
|
20559
|
+
__PYX_ERR(5, 141, __pyx_L1_error)
|
|
20547
20560
|
}
|
|
20548
20561
|
__pyx_t_1 = __pyx_v_self->nodes; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
|
|
20549
20562
|
for (;;) {
|
|
20550
20563
|
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
|
|
20551
20564
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
20552
|
-
__pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(5,
|
|
20565
|
+
__pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(5, 141, __pyx_L1_error)
|
|
20553
20566
|
#else
|
|
20554
|
-
__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20567
|
+
__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 141, __pyx_L1_error)
|
|
20555
20568
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20556
20569
|
#endif
|
|
20557
20570
|
__Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_3);
|
|
20558
20571
|
__pyx_t_3 = 0;
|
|
20559
20572
|
|
|
20560
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20573
|
+
/* "selectolax/lexbor/selection.pxi":142
|
|
20561
20574
|
* nodes = []
|
|
20562
20575
|
* for node in self.nodes:
|
|
20563
20576
|
* attr = node.attributes.get(attribute) # <<<<<<<<<<<<<<
|
|
20564
20577
|
* if attr and start and start in attr:
|
|
20565
20578
|
* attr = attr[attr.find(start) + len(start):]
|
|
20566
20579
|
*/
|
|
20567
|
-
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_attributes_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
20580
|
+
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_attributes_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 142, __pyx_L1_error)
|
|
20568
20581
|
__Pyx_GOTREF(__pyx_t_4);
|
|
20569
|
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20582
|
+
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 142, __pyx_L1_error)
|
|
20570
20583
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20571
20584
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20572
20585
|
__pyx_t_4 = NULL;
|
|
@@ -20581,20 +20594,20 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20581
20594
|
}
|
|
20582
20595
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_attribute) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_attribute);
|
|
20583
20596
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20584
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20597
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 142, __pyx_L1_error)
|
|
20585
20598
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20586
20599
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
20587
20600
|
__Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_3);
|
|
20588
20601
|
__pyx_t_3 = 0;
|
|
20589
20602
|
|
|
20590
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20603
|
+
/* "selectolax/lexbor/selection.pxi":143
|
|
20591
20604
|
* for node in self.nodes:
|
|
20592
20605
|
* attr = node.attributes.get(attribute)
|
|
20593
20606
|
* if attr and start and start in attr: # <<<<<<<<<<<<<<
|
|
20594
20607
|
* attr = attr[attr.find(start) + len(start):]
|
|
20595
20608
|
* if len(attr) > length:
|
|
20596
20609
|
*/
|
|
20597
|
-
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_attr); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20610
|
+
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_attr); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5, 143, __pyx_L1_error)
|
|
20598
20611
|
if (__pyx_t_7) {
|
|
20599
20612
|
} else {
|
|
20600
20613
|
__pyx_t_6 = __pyx_t_7;
|
|
@@ -20606,20 +20619,20 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20606
20619
|
__pyx_t_6 = __pyx_t_7;
|
|
20607
20620
|
goto __pyx_L6_bool_binop_done;
|
|
20608
20621
|
}
|
|
20609
|
-
__pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_start, __pyx_v_attr, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20622
|
+
__pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_start, __pyx_v_attr, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5, 143, __pyx_L1_error)
|
|
20610
20623
|
__pyx_t_8 = (__pyx_t_7 != 0);
|
|
20611
20624
|
__pyx_t_6 = __pyx_t_8;
|
|
20612
20625
|
__pyx_L6_bool_binop_done:;
|
|
20613
20626
|
if (__pyx_t_6) {
|
|
20614
20627
|
|
|
20615
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20628
|
+
/* "selectolax/lexbor/selection.pxi":144
|
|
20616
20629
|
* attr = node.attributes.get(attribute)
|
|
20617
20630
|
* if attr and start and start in attr:
|
|
20618
20631
|
* attr = attr[attr.find(start) + len(start):] # <<<<<<<<<<<<<<
|
|
20619
20632
|
* if len(attr) > length:
|
|
20620
20633
|
* nodes.append(node)
|
|
20621
20634
|
*/
|
|
20622
|
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20635
|
+
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 144, __pyx_L1_error)
|
|
20623
20636
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20624
20637
|
__pyx_t_4 = NULL;
|
|
20625
20638
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
|
|
@@ -20633,27 +20646,27 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20633
20646
|
}
|
|
20634
20647
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_start) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_start);
|
|
20635
20648
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20636
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20649
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 144, __pyx_L1_error)
|
|
20637
20650
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20638
20651
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
20639
20652
|
if (unlikely(__pyx_v_start == Py_None)) {
|
|
20640
20653
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
20641
|
-
__PYX_ERR(5,
|
|
20654
|
+
__PYX_ERR(5, 144, __pyx_L1_error)
|
|
20642
20655
|
}
|
|
20643
|
-
__pyx_t_9 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_start); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5,
|
|
20644
|
-
__pyx_t_5 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20656
|
+
__pyx_t_9 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_start); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5, 144, __pyx_L1_error)
|
|
20657
|
+
__pyx_t_5 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 144, __pyx_L1_error)
|
|
20645
20658
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20646
|
-
__pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
20659
|
+
__pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 144, __pyx_L1_error)
|
|
20647
20660
|
__Pyx_GOTREF(__pyx_t_4);
|
|
20648
20661
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
20649
20662
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
20650
|
-
__pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_attr, 0, 0, &__pyx_t_4, NULL, NULL, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20663
|
+
__pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_attr, 0, 0, &__pyx_t_4, NULL, NULL, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 144, __pyx_L1_error)
|
|
20651
20664
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20652
20665
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20653
20666
|
__Pyx_DECREF_SET(__pyx_v_attr, __pyx_t_5);
|
|
20654
20667
|
__pyx_t_5 = 0;
|
|
20655
20668
|
|
|
20656
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20669
|
+
/* "selectolax/lexbor/selection.pxi":143
|
|
20657
20670
|
* for node in self.nodes:
|
|
20658
20671
|
* attr = node.attributes.get(attribute)
|
|
20659
20672
|
* if attr and start and start in attr: # <<<<<<<<<<<<<<
|
|
@@ -20662,27 +20675,27 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20662
20675
|
*/
|
|
20663
20676
|
}
|
|
20664
20677
|
|
|
20665
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20678
|
+
/* "selectolax/lexbor/selection.pxi":145
|
|
20666
20679
|
* if attr and start and start in attr:
|
|
20667
20680
|
* attr = attr[attr.find(start) + len(start):]
|
|
20668
20681
|
* if len(attr) > length: # <<<<<<<<<<<<<<
|
|
20669
20682
|
* nodes.append(node)
|
|
20670
20683
|
* self.nodes = nodes
|
|
20671
20684
|
*/
|
|
20672
|
-
__pyx_t_9 = PyObject_Length(__pyx_v_attr); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5,
|
|
20685
|
+
__pyx_t_9 = PyObject_Length(__pyx_v_attr); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5, 145, __pyx_L1_error)
|
|
20673
20686
|
__pyx_t_6 = ((__pyx_t_9 > __pyx_v_length) != 0);
|
|
20674
20687
|
if (__pyx_t_6) {
|
|
20675
20688
|
|
|
20676
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20689
|
+
/* "selectolax/lexbor/selection.pxi":146
|
|
20677
20690
|
* attr = attr[attr.find(start) + len(start):]
|
|
20678
20691
|
* if len(attr) > length:
|
|
20679
20692
|
* nodes.append(node) # <<<<<<<<<<<<<<
|
|
20680
20693
|
* self.nodes = nodes
|
|
20681
20694
|
* return self
|
|
20682
20695
|
*/
|
|
20683
|
-
__pyx_t_10 = __Pyx_PyList_Append(__pyx_v_nodes, __pyx_v_node); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5,
|
|
20696
|
+
__pyx_t_10 = __Pyx_PyList_Append(__pyx_v_nodes, __pyx_v_node); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 146, __pyx_L1_error)
|
|
20684
20697
|
|
|
20685
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20698
|
+
/* "selectolax/lexbor/selection.pxi":145
|
|
20686
20699
|
* if attr and start and start in attr:
|
|
20687
20700
|
* attr = attr[attr.find(start) + len(start):]
|
|
20688
20701
|
* if len(attr) > length: # <<<<<<<<<<<<<<
|
|
@@ -20691,7 +20704,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20691
20704
|
*/
|
|
20692
20705
|
}
|
|
20693
20706
|
|
|
20694
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20707
|
+
/* "selectolax/lexbor/selection.pxi":141
|
|
20695
20708
|
* """
|
|
20696
20709
|
* nodes = []
|
|
20697
20710
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -20701,7 +20714,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20701
20714
|
}
|
|
20702
20715
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
20703
20716
|
|
|
20704
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20717
|
+
/* "selectolax/lexbor/selection.pxi":147
|
|
20705
20718
|
* if len(attr) > length:
|
|
20706
20719
|
* nodes.append(node)
|
|
20707
20720
|
* self.nodes = nodes # <<<<<<<<<<<<<<
|
|
@@ -20714,7 +20727,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20714
20727
|
__Pyx_DECREF(__pyx_v_self->nodes);
|
|
20715
20728
|
__pyx_v_self->nodes = __pyx_v_nodes;
|
|
20716
20729
|
|
|
20717
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20730
|
+
/* "selectolax/lexbor/selection.pxi":148
|
|
20718
20731
|
* nodes.append(node)
|
|
20719
20732
|
* self.nodes = nodes
|
|
20720
20733
|
* return self # <<<<<<<<<<<<<<
|
|
@@ -20726,7 +20739,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20726
20739
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
20727
20740
|
goto __pyx_L0;
|
|
20728
20741
|
|
|
20729
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20742
|
+
/* "selectolax/lexbor/selection.pxi":135
|
|
20730
20743
|
* return False
|
|
20731
20744
|
*
|
|
20732
20745
|
* def attribute_longer_than(self, str attribute, int length, str start = None): # <<<<<<<<<<<<<<
|
|
@@ -20751,7 +20764,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20751
20764
|
return __pyx_r;
|
|
20752
20765
|
}
|
|
20753
20766
|
|
|
20754
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20767
|
+
/* "selectolax/lexbor/selection.pxi":150
|
|
20755
20768
|
* return self
|
|
20756
20769
|
*
|
|
20757
20770
|
* def any_attribute_longer_than(self, str attribute, int length, str start = None): # <<<<<<<<<<<<<<
|
|
@@ -20798,7 +20811,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_11any_attribute_
|
|
|
20798
20811
|
case 1:
|
|
20799
20812
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--;
|
|
20800
20813
|
else {
|
|
20801
|
-
__Pyx_RaiseArgtupleInvalid("any_attribute_longer_than", 0, 2, 3, 1); __PYX_ERR(5,
|
|
20814
|
+
__Pyx_RaiseArgtupleInvalid("any_attribute_longer_than", 0, 2, 3, 1); __PYX_ERR(5, 150, __pyx_L3_error)
|
|
20802
20815
|
}
|
|
20803
20816
|
CYTHON_FALLTHROUGH;
|
|
20804
20817
|
case 2:
|
|
@@ -20808,7 +20821,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_11any_attribute_
|
|
|
20808
20821
|
}
|
|
20809
20822
|
}
|
|
20810
20823
|
if (unlikely(kw_args > 0)) {
|
|
20811
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "any_attribute_longer_than") < 0)) __PYX_ERR(5,
|
|
20824
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "any_attribute_longer_than") < 0)) __PYX_ERR(5, 150, __pyx_L3_error)
|
|
20812
20825
|
}
|
|
20813
20826
|
} else {
|
|
20814
20827
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
@@ -20821,19 +20834,19 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_11any_attribute_
|
|
|
20821
20834
|
}
|
|
20822
20835
|
}
|
|
20823
20836
|
__pyx_v_attribute = ((PyObject*)values[0]);
|
|
20824
|
-
__pyx_v_length = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(5,
|
|
20837
|
+
__pyx_v_length = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 150, __pyx_L3_error)
|
|
20825
20838
|
__pyx_v_start = ((PyObject*)values[2]);
|
|
20826
20839
|
}
|
|
20827
20840
|
goto __pyx_L4_argument_unpacking_done;
|
|
20828
20841
|
__pyx_L5_argtuple_error:;
|
|
20829
|
-
__Pyx_RaiseArgtupleInvalid("any_attribute_longer_than", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5,
|
|
20842
|
+
__Pyx_RaiseArgtupleInvalid("any_attribute_longer_than", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 150, __pyx_L3_error)
|
|
20830
20843
|
__pyx_L3_error:;
|
|
20831
20844
|
__Pyx_AddTraceback("selectolax.lexbor.LexborSelector.any_attribute_longer_than", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
20832
20845
|
__Pyx_RefNannyFinishContext();
|
|
20833
20846
|
return NULL;
|
|
20834
20847
|
__pyx_L4_argument_unpacking_done:;
|
|
20835
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute), (&PyUnicode_Type), 1, "attribute", 1))) __PYX_ERR(5,
|
|
20836
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), (&PyUnicode_Type), 1, "start", 1))) __PYX_ERR(5,
|
|
20848
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute), (&PyUnicode_Type), 1, "attribute", 1))) __PYX_ERR(5, 150, __pyx_L1_error)
|
|
20849
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), (&PyUnicode_Type), 1, "start", 1))) __PYX_ERR(5, 150, __pyx_L1_error)
|
|
20837
20850
|
__pyx_r = __pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_longer_than(((struct __pyx_obj_10selectolax_6lexbor_LexborSelector *)__pyx_v_self), __pyx_v_attribute, __pyx_v_length, __pyx_v_start);
|
|
20838
20851
|
|
|
20839
20852
|
/* function exit code */
|
|
@@ -20865,19 +20878,19 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
20865
20878
|
int __pyx_clineno = 0;
|
|
20866
20879
|
__Pyx_RefNannySetupContext("any_attribute_longer_than", 0);
|
|
20867
20880
|
|
|
20868
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20881
|
+
/* "selectolax/lexbor/selection.pxi":155
|
|
20869
20882
|
* Similar to `string-length` in XPath.
|
|
20870
20883
|
* """
|
|
20871
20884
|
* nodes = [] # <<<<<<<<<<<<<<
|
|
20872
20885
|
* for node in self.nodes:
|
|
20873
20886
|
* attr = node.attributes.get(attribute)
|
|
20874
20887
|
*/
|
|
20875
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
20888
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 155, __pyx_L1_error)
|
|
20876
20889
|
__Pyx_GOTREF(__pyx_t_1);
|
|
20877
20890
|
__pyx_v_nodes = ((PyObject*)__pyx_t_1);
|
|
20878
20891
|
__pyx_t_1 = 0;
|
|
20879
20892
|
|
|
20880
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20893
|
+
/* "selectolax/lexbor/selection.pxi":156
|
|
20881
20894
|
* """
|
|
20882
20895
|
* nodes = []
|
|
20883
20896
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -20886,30 +20899,30 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
20886
20899
|
*/
|
|
20887
20900
|
if (unlikely(__pyx_v_self->nodes == Py_None)) {
|
|
20888
20901
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
20889
|
-
__PYX_ERR(5,
|
|
20902
|
+
__PYX_ERR(5, 156, __pyx_L1_error)
|
|
20890
20903
|
}
|
|
20891
20904
|
__pyx_t_1 = __pyx_v_self->nodes; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
|
|
20892
20905
|
for (;;) {
|
|
20893
20906
|
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
|
|
20894
20907
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
20895
|
-
__pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(5,
|
|
20908
|
+
__pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(5, 156, __pyx_L1_error)
|
|
20896
20909
|
#else
|
|
20897
|
-
__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20910
|
+
__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 156, __pyx_L1_error)
|
|
20898
20911
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20899
20912
|
#endif
|
|
20900
20913
|
__Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_3);
|
|
20901
20914
|
__pyx_t_3 = 0;
|
|
20902
20915
|
|
|
20903
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20916
|
+
/* "selectolax/lexbor/selection.pxi":157
|
|
20904
20917
|
* nodes = []
|
|
20905
20918
|
* for node in self.nodes:
|
|
20906
20919
|
* attr = node.attributes.get(attribute) # <<<<<<<<<<<<<<
|
|
20907
20920
|
* if attr and start and start in attr:
|
|
20908
20921
|
* attr = attr[attr.find(start) + len(start):]
|
|
20909
20922
|
*/
|
|
20910
|
-
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_attributes_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
20923
|
+
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_attributes_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 157, __pyx_L1_error)
|
|
20911
20924
|
__Pyx_GOTREF(__pyx_t_4);
|
|
20912
|
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20925
|
+
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 157, __pyx_L1_error)
|
|
20913
20926
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20914
20927
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20915
20928
|
__pyx_t_4 = NULL;
|
|
@@ -20924,20 +20937,20 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
20924
20937
|
}
|
|
20925
20938
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_attribute) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_attribute);
|
|
20926
20939
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20927
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20940
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 157, __pyx_L1_error)
|
|
20928
20941
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20929
20942
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
20930
20943
|
__Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_3);
|
|
20931
20944
|
__pyx_t_3 = 0;
|
|
20932
20945
|
|
|
20933
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20946
|
+
/* "selectolax/lexbor/selection.pxi":158
|
|
20934
20947
|
* for node in self.nodes:
|
|
20935
20948
|
* attr = node.attributes.get(attribute)
|
|
20936
20949
|
* if attr and start and start in attr: # <<<<<<<<<<<<<<
|
|
20937
20950
|
* attr = attr[attr.find(start) + len(start):]
|
|
20938
20951
|
* if len(attr) > length:
|
|
20939
20952
|
*/
|
|
20940
|
-
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_attr); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20953
|
+
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_attr); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5, 158, __pyx_L1_error)
|
|
20941
20954
|
if (__pyx_t_7) {
|
|
20942
20955
|
} else {
|
|
20943
20956
|
__pyx_t_6 = __pyx_t_7;
|
|
@@ -20949,20 +20962,20 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
20949
20962
|
__pyx_t_6 = __pyx_t_7;
|
|
20950
20963
|
goto __pyx_L6_bool_binop_done;
|
|
20951
20964
|
}
|
|
20952
|
-
__pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_start, __pyx_v_attr, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20965
|
+
__pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_start, __pyx_v_attr, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5, 158, __pyx_L1_error)
|
|
20953
20966
|
__pyx_t_8 = (__pyx_t_7 != 0);
|
|
20954
20967
|
__pyx_t_6 = __pyx_t_8;
|
|
20955
20968
|
__pyx_L6_bool_binop_done:;
|
|
20956
20969
|
if (__pyx_t_6) {
|
|
20957
20970
|
|
|
20958
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20971
|
+
/* "selectolax/lexbor/selection.pxi":159
|
|
20959
20972
|
* attr = node.attributes.get(attribute)
|
|
20960
20973
|
* if attr and start and start in attr:
|
|
20961
20974
|
* attr = attr[attr.find(start) + len(start):] # <<<<<<<<<<<<<<
|
|
20962
20975
|
* if len(attr) > length:
|
|
20963
20976
|
* return True
|
|
20964
20977
|
*/
|
|
20965
|
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20978
|
+
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 159, __pyx_L1_error)
|
|
20966
20979
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20967
20980
|
__pyx_t_4 = NULL;
|
|
20968
20981
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
|
|
@@ -20976,27 +20989,27 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
20976
20989
|
}
|
|
20977
20990
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_start) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_start);
|
|
20978
20991
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20979
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20992
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 159, __pyx_L1_error)
|
|
20980
20993
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20981
20994
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
20982
20995
|
if (unlikely(__pyx_v_start == Py_None)) {
|
|
20983
20996
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
20984
|
-
__PYX_ERR(5,
|
|
20997
|
+
__PYX_ERR(5, 159, __pyx_L1_error)
|
|
20985
20998
|
}
|
|
20986
|
-
__pyx_t_9 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_start); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5,
|
|
20987
|
-
__pyx_t_5 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20999
|
+
__pyx_t_9 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_start); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5, 159, __pyx_L1_error)
|
|
21000
|
+
__pyx_t_5 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 159, __pyx_L1_error)
|
|
20988
21001
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20989
|
-
__pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
21002
|
+
__pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 159, __pyx_L1_error)
|
|
20990
21003
|
__Pyx_GOTREF(__pyx_t_4);
|
|
20991
21004
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
20992
21005
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
20993
|
-
__pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_attr, 0, 0, &__pyx_t_4, NULL, NULL, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
21006
|
+
__pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_attr, 0, 0, &__pyx_t_4, NULL, NULL, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 159, __pyx_L1_error)
|
|
20994
21007
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20995
21008
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20996
21009
|
__Pyx_DECREF_SET(__pyx_v_attr, __pyx_t_5);
|
|
20997
21010
|
__pyx_t_5 = 0;
|
|
20998
21011
|
|
|
20999
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21012
|
+
/* "selectolax/lexbor/selection.pxi":158
|
|
21000
21013
|
* for node in self.nodes:
|
|
21001
21014
|
* attr = node.attributes.get(attribute)
|
|
21002
21015
|
* if attr and start and start in attr: # <<<<<<<<<<<<<<
|
|
@@ -21005,18 +21018,18 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
21005
21018
|
*/
|
|
21006
21019
|
}
|
|
21007
21020
|
|
|
21008
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21021
|
+
/* "selectolax/lexbor/selection.pxi":160
|
|
21009
21022
|
* if attr and start and start in attr:
|
|
21010
21023
|
* attr = attr[attr.find(start) + len(start):]
|
|
21011
21024
|
* if len(attr) > length: # <<<<<<<<<<<<<<
|
|
21012
21025
|
* return True
|
|
21013
21026
|
* return False
|
|
21014
21027
|
*/
|
|
21015
|
-
__pyx_t_9 = PyObject_Length(__pyx_v_attr); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5,
|
|
21028
|
+
__pyx_t_9 = PyObject_Length(__pyx_v_attr); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5, 160, __pyx_L1_error)
|
|
21016
21029
|
__pyx_t_6 = ((__pyx_t_9 > __pyx_v_length) != 0);
|
|
21017
21030
|
if (__pyx_t_6) {
|
|
21018
21031
|
|
|
21019
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21032
|
+
/* "selectolax/lexbor/selection.pxi":161
|
|
21020
21033
|
* attr = attr[attr.find(start) + len(start):]
|
|
21021
21034
|
* if len(attr) > length:
|
|
21022
21035
|
* return True # <<<<<<<<<<<<<<
|
|
@@ -21029,7 +21042,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
21029
21042
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21030
21043
|
goto __pyx_L0;
|
|
21031
21044
|
|
|
21032
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21045
|
+
/* "selectolax/lexbor/selection.pxi":160
|
|
21033
21046
|
* if attr and start and start in attr:
|
|
21034
21047
|
* attr = attr[attr.find(start) + len(start):]
|
|
21035
21048
|
* if len(attr) > length: # <<<<<<<<<<<<<<
|
|
@@ -21038,7 +21051,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
21038
21051
|
*/
|
|
21039
21052
|
}
|
|
21040
21053
|
|
|
21041
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21054
|
+
/* "selectolax/lexbor/selection.pxi":156
|
|
21042
21055
|
* """
|
|
21043
21056
|
* nodes = []
|
|
21044
21057
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -21048,7 +21061,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
21048
21061
|
}
|
|
21049
21062
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21050
21063
|
|
|
21051
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21064
|
+
/* "selectolax/lexbor/selection.pxi":162
|
|
21052
21065
|
* if len(attr) > length:
|
|
21053
21066
|
* return True
|
|
21054
21067
|
* return False # <<<<<<<<<<<<<<
|
|
@@ -21060,7 +21073,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
21060
21073
|
__pyx_r = Py_False;
|
|
21061
21074
|
goto __pyx_L0;
|
|
21062
21075
|
|
|
21063
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21076
|
+
/* "selectolax/lexbor/selection.pxi":150
|
|
21064
21077
|
* return self
|
|
21065
21078
|
*
|
|
21066
21079
|
* def any_attribute_longer_than(self, str attribute, int length, str start = None): # <<<<<<<<<<<<<<
|
|
@@ -21085,7 +21098,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
21085
21098
|
return __pyx_r;
|
|
21086
21099
|
}
|
|
21087
21100
|
|
|
21088
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21101
|
+
/* "selectolax/lexbor/selection.pxi":164
|
|
21089
21102
|
* return False
|
|
21090
21103
|
*
|
|
21091
21104
|
* def __bool__(self): # <<<<<<<<<<<<<<
|
|
@@ -21116,21 +21129,21 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector_12__bool__(struct __py
|
|
|
21116
21129
|
int __pyx_clineno = 0;
|
|
21117
21130
|
__Pyx_RefNannySetupContext("__bool__", 0);
|
|
21118
21131
|
|
|
21119
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21132
|
+
/* "selectolax/lexbor/selection.pxi":165
|
|
21120
21133
|
*
|
|
21121
21134
|
* def __bool__(self):
|
|
21122
21135
|
* return bool(self.nodes) # <<<<<<<<<<<<<<
|
|
21123
21136
|
*
|
|
21124
21137
|
*
|
|
21125
21138
|
*/
|
|
21126
|
-
__pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cpython_4bool_bool), __pyx_v_self->nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
21139
|
+
__pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cpython_4bool_bool), __pyx_v_self->nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 165, __pyx_L1_error)
|
|
21127
21140
|
__Pyx_GOTREF(__pyx_t_1);
|
|
21128
|
-
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5,
|
|
21141
|
+
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 165, __pyx_L1_error)
|
|
21129
21142
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21130
21143
|
__pyx_r = __pyx_t_2;
|
|
21131
21144
|
goto __pyx_L0;
|
|
21132
21145
|
|
|
21133
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21146
|
+
/* "selectolax/lexbor/selection.pxi":164
|
|
21134
21147
|
* return False
|
|
21135
21148
|
*
|
|
21136
21149
|
* def __bool__(self): # <<<<<<<<<<<<<<
|
|
@@ -21457,7 +21470,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_16__setstate_cyt
|
|
|
21457
21470
|
return __pyx_r;
|
|
21458
21471
|
}
|
|
21459
21472
|
|
|
21460
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21473
|
+
/* "selectolax/lexbor/selection.pxi":168
|
|
21461
21474
|
*
|
|
21462
21475
|
*
|
|
21463
21476
|
* cdef lxb_status_t css_finder_callback(lxb_dom_node_t *node, lxb_css_selector_specificity_t *spec, void *ctx): # <<<<<<<<<<<<<<
|
|
@@ -21478,7 +21491,7 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_finder_callback(lxb_dom_nod
|
|
|
21478
21491
|
int __pyx_clineno = 0;
|
|
21479
21492
|
__Pyx_RefNannySetupContext("css_finder_callback", 0);
|
|
21480
21493
|
|
|
21481
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21494
|
+
/* "selectolax/lexbor/selection.pxi":171
|
|
21482
21495
|
* cdef LexborNode lxb_node
|
|
21483
21496
|
* cdef object cls
|
|
21484
21497
|
* cls = <object> ctx # <<<<<<<<<<<<<<
|
|
@@ -21490,49 +21503,49 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_finder_callback(lxb_dom_nod
|
|
|
21490
21503
|
__pyx_v_cls = __pyx_t_1;
|
|
21491
21504
|
__pyx_t_1 = 0;
|
|
21492
21505
|
|
|
21493
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21506
|
+
/* "selectolax/lexbor/selection.pxi":172
|
|
21494
21507
|
* cdef object cls
|
|
21495
21508
|
* cls = <object> ctx
|
|
21496
21509
|
* lxb_node = LexborNode() # <<<<<<<<<<<<<<
|
|
21497
21510
|
* lxb_node._cinit(<lxb_dom_node_t *> node, cls.current_node.parser)
|
|
21498
21511
|
* cls.results.append(lxb_node)
|
|
21499
21512
|
*/
|
|
21500
|
-
__pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_10selectolax_6lexbor_LexborNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
21513
|
+
__pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_10selectolax_6lexbor_LexborNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 172, __pyx_L1_error)
|
|
21501
21514
|
__Pyx_GOTREF(__pyx_t_1);
|
|
21502
21515
|
__pyx_v_lxb_node = ((struct __pyx_obj_10selectolax_6lexbor_LexborNode *)__pyx_t_1);
|
|
21503
21516
|
__pyx_t_1 = 0;
|
|
21504
21517
|
|
|
21505
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21518
|
+
/* "selectolax/lexbor/selection.pxi":173
|
|
21506
21519
|
* cls = <object> ctx
|
|
21507
21520
|
* lxb_node = LexborNode()
|
|
21508
21521
|
* lxb_node._cinit(<lxb_dom_node_t *> node, cls.current_node.parser) # <<<<<<<<<<<<<<
|
|
21509
21522
|
* cls.results.append(lxb_node)
|
|
21510
21523
|
* return LXB_STATUS_OK
|
|
21511
21524
|
*/
|
|
21512
|
-
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_current_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
21525
|
+
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_current_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 173, __pyx_L1_error)
|
|
21513
21526
|
__Pyx_GOTREF(__pyx_t_1);
|
|
21514
|
-
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(5,
|
|
21527
|
+
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 173, __pyx_L1_error)
|
|
21515
21528
|
__Pyx_GOTREF(__pyx_t_2);
|
|
21516
21529
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21517
|
-
if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10selectolax_6lexbor_LexborHTMLParser))))) __PYX_ERR(5,
|
|
21518
|
-
__pyx_t_1 = __pyx_f_10selectolax_6lexbor_10LexborNode__cinit(__pyx_v_lxb_node, ((lxb_dom_node_t *)__pyx_v_node), ((struct __pyx_obj_10selectolax_6lexbor_LexborHTMLParser *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
21530
|
+
if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10selectolax_6lexbor_LexborHTMLParser))))) __PYX_ERR(5, 173, __pyx_L1_error)
|
|
21531
|
+
__pyx_t_1 = __pyx_f_10selectolax_6lexbor_10LexborNode__cinit(__pyx_v_lxb_node, ((lxb_dom_node_t *)__pyx_v_node), ((struct __pyx_obj_10selectolax_6lexbor_LexborHTMLParser *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 173, __pyx_L1_error)
|
|
21519
21532
|
__Pyx_GOTREF(__pyx_t_1);
|
|
21520
21533
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
21521
21534
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21522
21535
|
|
|
21523
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21536
|
+
/* "selectolax/lexbor/selection.pxi":174
|
|
21524
21537
|
* lxb_node = LexborNode()
|
|
21525
21538
|
* lxb_node._cinit(<lxb_dom_node_t *> node, cls.current_node.parser)
|
|
21526
21539
|
* cls.results.append(lxb_node) # <<<<<<<<<<<<<<
|
|
21527
21540
|
* return LXB_STATUS_OK
|
|
21528
21541
|
*
|
|
21529
21542
|
*/
|
|
21530
|
-
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
21543
|
+
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 174, __pyx_L1_error)
|
|
21531
21544
|
__Pyx_GOTREF(__pyx_t_1);
|
|
21532
|
-
__pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_1, ((PyObject *)__pyx_v_lxb_node)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5,
|
|
21545
|
+
__pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_1, ((PyObject *)__pyx_v_lxb_node)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 174, __pyx_L1_error)
|
|
21533
21546
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21534
21547
|
|
|
21535
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21548
|
+
/* "selectolax/lexbor/selection.pxi":175
|
|
21536
21549
|
* lxb_node._cinit(<lxb_dom_node_t *> node, cls.current_node.parser)
|
|
21537
21550
|
* cls.results.append(lxb_node)
|
|
21538
21551
|
* return LXB_STATUS_OK # <<<<<<<<<<<<<<
|
|
@@ -21542,7 +21555,7 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_finder_callback(lxb_dom_nod
|
|
|
21542
21555
|
__pyx_r = LXB_STATUS_OK;
|
|
21543
21556
|
goto __pyx_L0;
|
|
21544
21557
|
|
|
21545
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21558
|
+
/* "selectolax/lexbor/selection.pxi":168
|
|
21546
21559
|
*
|
|
21547
21560
|
*
|
|
21548
21561
|
* cdef lxb_status_t css_finder_callback(lxb_dom_node_t *node, lxb_css_selector_specificity_t *spec, void *ctx): # <<<<<<<<<<<<<<
|
|
@@ -21563,7 +21576,7 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_finder_callback(lxb_dom_nod
|
|
|
21563
21576
|
return __pyx_r;
|
|
21564
21577
|
}
|
|
21565
21578
|
|
|
21566
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21579
|
+
/* "selectolax/lexbor/selection.pxi":177
|
|
21567
21580
|
* return LXB_STATUS_OK
|
|
21568
21581
|
*
|
|
21569
21582
|
* cdef lxb_status_t css_matcher_callback(lxb_dom_node_t *node, lxb_css_selector_specificity_t *spec, void *ctx): # <<<<<<<<<<<<<<
|
|
@@ -21582,7 +21595,7 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_matcher_callback(CYTHON_UNU
|
|
|
21582
21595
|
int __pyx_clineno = 0;
|
|
21583
21596
|
__Pyx_RefNannySetupContext("css_matcher_callback", 0);
|
|
21584
21597
|
|
|
21585
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21598
|
+
/* "selectolax/lexbor/selection.pxi":180
|
|
21586
21599
|
* cdef LexborNode lxb_node
|
|
21587
21600
|
* cdef object cls
|
|
21588
21601
|
* cls = <object> ctx # <<<<<<<<<<<<<<
|
|
@@ -21594,18 +21607,18 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_matcher_callback(CYTHON_UNU
|
|
|
21594
21607
|
__pyx_v_cls = __pyx_t_1;
|
|
21595
21608
|
__pyx_t_1 = 0;
|
|
21596
21609
|
|
|
21597
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21610
|
+
/* "selectolax/lexbor/selection.pxi":181
|
|
21598
21611
|
* cdef object cls
|
|
21599
21612
|
* cls = <object> ctx
|
|
21600
21613
|
* cls.results.append(True) # <<<<<<<<<<<<<<
|
|
21601
21614
|
* return LXB_STATUS_STOP
|
|
21602
21615
|
*/
|
|
21603
|
-
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
21616
|
+
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 181, __pyx_L1_error)
|
|
21604
21617
|
__Pyx_GOTREF(__pyx_t_1);
|
|
21605
|
-
__pyx_t_2 = __Pyx_PyObject_Append(__pyx_t_1, Py_True); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5,
|
|
21618
|
+
__pyx_t_2 = __Pyx_PyObject_Append(__pyx_t_1, Py_True); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 181, __pyx_L1_error)
|
|
21606
21619
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21607
21620
|
|
|
21608
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21621
|
+
/* "selectolax/lexbor/selection.pxi":182
|
|
21609
21622
|
* cls = <object> ctx
|
|
21610
21623
|
* cls.results.append(True)
|
|
21611
21624
|
* return LXB_STATUS_STOP # <<<<<<<<<<<<<<
|
|
@@ -21613,7 +21626,7 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_matcher_callback(CYTHON_UNU
|
|
|
21613
21626
|
__pyx_r = LXB_STATUS_STOP;
|
|
21614
21627
|
goto __pyx_L0;
|
|
21615
21628
|
|
|
21616
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21629
|
+
/* "selectolax/lexbor/selection.pxi":177
|
|
21617
21630
|
* return LXB_STATUS_OK
|
|
21618
21631
|
*
|
|
21619
21632
|
* cdef lxb_status_t css_matcher_callback(lxb_dom_node_t *node, lxb_css_selector_specificity_t *spec, void *ctx): # <<<<<<<<<<<<<<
|
|
@@ -23946,7 +23959,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_16LexborHTMLParser_14strip_tags(s
|
|
|
23946
23959
|
|
|
23947
23960
|
/* Python wrapper */
|
|
23948
23961
|
static PyObject *__pyx_pw_10selectolax_6lexbor_16LexborHTMLParser_17select(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
23949
|
-
static char __pyx_doc_10selectolax_6lexbor_16LexborHTMLParser_16select[] = "LexborHTMLParser.select(self, query=None)\nSelect nodes give a CSS selector.\n\n Works similarly to the
|
|
23962
|
+
static char __pyx_doc_10selectolax_6lexbor_16LexborHTMLParser_16select[] = "LexborHTMLParser.select(self, query=None)\nSelect nodes give a CSS selector.\n\n Works similarly to the ``css`` method, but supports chained filtering and extra features.\n\n Parameters\n ----------\n query : str or None\n The CSS selector to use when searching for nodes.\n\n Returns\n -------\n selector : The `Selector` class.\n ";
|
|
23950
23963
|
static PyObject *__pyx_pw_10selectolax_6lexbor_16LexborHTMLParser_17select(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
23951
23964
|
PyObject *__pyx_v_query = 0;
|
|
23952
23965
|
int __pyx_lineno = 0;
|
|
@@ -28384,16 +28397,16 @@ static int __Pyx_modinit_type_init_code(void) {
|
|
|
28384
28397
|
__pyx_ptype_10selectolax_6lexbor_TextContainer = &__pyx_type_10selectolax_6lexbor_TextContainer;
|
|
28385
28398
|
__pyx_vtabptr_10selectolax_6lexbor_LexborSelector = &__pyx_vtable_10selectolax_6lexbor_LexborSelector;
|
|
28386
28399
|
__pyx_vtable_10selectolax_6lexbor_LexborSelector.css = (PyObject *(*)(struct __pyx_obj_10selectolax_6lexbor_LexborSelector *, PyObject *, int __pyx_skip_dispatch))__pyx_f_10selectolax_6lexbor_14LexborSelector_css;
|
|
28387
|
-
if (PyType_Ready(&__pyx_type_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5,
|
|
28400
|
+
if (PyType_Ready(&__pyx_type_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5, 87, __pyx_L1_error)
|
|
28388
28401
|
#if PY_VERSION_HEX < 0x030800B1
|
|
28389
28402
|
__pyx_type_10selectolax_6lexbor_LexborSelector.tp_print = 0;
|
|
28390
28403
|
#endif
|
|
28391
28404
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10selectolax_6lexbor_LexborSelector.tp_dictoffset && __pyx_type_10selectolax_6lexbor_LexborSelector.tp_getattro == PyObject_GenericGetAttr)) {
|
|
28392
28405
|
__pyx_type_10selectolax_6lexbor_LexborSelector.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
28393
28406
|
}
|
|
28394
|
-
if (__Pyx_SetVtable(__pyx_type_10selectolax_6lexbor_LexborSelector.tp_dict, __pyx_vtabptr_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5,
|
|
28395
|
-
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LexborSelector, (PyObject *)&__pyx_type_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5,
|
|
28396
|
-
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5,
|
|
28407
|
+
if (__Pyx_SetVtable(__pyx_type_10selectolax_6lexbor_LexborSelector.tp_dict, __pyx_vtabptr_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5, 87, __pyx_L1_error)
|
|
28408
|
+
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LexborSelector, (PyObject *)&__pyx_type_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5, 87, __pyx_L1_error)
|
|
28409
|
+
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5, 87, __pyx_L1_error)
|
|
28397
28410
|
__pyx_ptype_10selectolax_6lexbor_LexborSelector = &__pyx_type_10selectolax_6lexbor_LexborSelector;
|
|
28398
28411
|
if (PyType_Ready(&__pyx_type_10selectolax_6lexbor___pyx_scope_struct____iter__) < 0) __PYX_ERR(1, 15, __pyx_L1_error)
|
|
28399
28412
|
#if PY_VERSION_HEX < 0x030800B1
|