selectolax 0.3.16__cp39-cp39-win_amd64.whl → 0.3.18__cp39-cp39-win_amd64.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.cp39-win_amd64.pyd +0 -0
- selectolax/lexbor.pyx +1 -1
- selectolax/parser.cp39-win_amd64.pyd +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
|
@@ -220,8 +220,12 @@
|
|
|
220
220
|
"lexbor/source\\lexbor\\ports\\windows_nt\\lexbor\\core\\fs.c",
|
|
221
221
|
"lexbor/source\\lexbor\\ports\\windows_nt\\lexbor\\core\\memory.c",
|
|
222
222
|
"lexbor/source\\lexbor\\ports\\windows_nt\\lexbor\\core\\perf.c",
|
|
223
|
+
"lexbor/source\\lexbor\\punycode\\punycode.c",
|
|
223
224
|
"lexbor/source\\lexbor\\selectors\\selectors.c",
|
|
224
225
|
"lexbor/source\\lexbor\\tag\\tag.c",
|
|
226
|
+
"lexbor/source\\lexbor\\unicode\\idna.c",
|
|
227
|
+
"lexbor/source\\lexbor\\unicode\\unicode.c",
|
|
228
|
+
"lexbor/source\\lexbor\\url\\url.c",
|
|
225
229
|
"lexbor/source\\lexbor\\utils\\http.c",
|
|
226
230
|
"lexbor/source\\lexbor\\utils\\warc.c"
|
|
227
231
|
]
|
|
@@ -1318,7 +1322,7 @@ struct __pyx_obj_10selectolax_6lexbor_TextContainer {
|
|
|
1318
1322
|
};
|
|
1319
1323
|
|
|
1320
1324
|
|
|
1321
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
1325
|
+
/* "selectolax/lexbor/selection.pxi":87
|
|
1322
1326
|
*
|
|
1323
1327
|
*
|
|
1324
1328
|
* cdef class LexborSelector: # <<<<<<<<<<<<<<
|
|
@@ -1482,7 +1486,7 @@ static struct __pyx_vtabstruct_10selectolax_6lexbor_LexborAttributes *__pyx_vtab
|
|
|
1482
1486
|
static struct __pyx_obj_10selectolax_6lexbor_LexborAttributes *__pyx_f_10selectolax_6lexbor_16LexborAttributes_create(lxb_dom_node_t *);
|
|
1483
1487
|
|
|
1484
1488
|
|
|
1485
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
1489
|
+
/* "selectolax/lexbor/selection.pxi":87
|
|
1486
1490
|
*
|
|
1487
1491
|
*
|
|
1488
1492
|
* cdef class LexborSelector: # <<<<<<<<<<<<<<
|
|
@@ -18809,7 +18813,7 @@ static PyObject *__pyx_f_10selectolax_6lexbor_17LexborCSSSelector_any_matches(st
|
|
|
18809
18813
|
* raise SelectolaxError("Can't parse CSS selector.")
|
|
18810
18814
|
* result = bool(self.results) # <<<<<<<<<<<<<<
|
|
18811
18815
|
* self.results = []
|
|
18812
|
-
*
|
|
18816
|
+
* lxb_css_selector_list_destroy_memory(selectors_list)
|
|
18813
18817
|
*/
|
|
18814
18818
|
__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)
|
|
18815
18819
|
__Pyx_GOTREF(__pyx_t_1);
|
|
@@ -18820,8 +18824,8 @@ static PyObject *__pyx_f_10selectolax_6lexbor_17LexborCSSSelector_any_matches(st
|
|
|
18820
18824
|
* raise SelectolaxError("Can't parse CSS selector.")
|
|
18821
18825
|
* result = bool(self.results)
|
|
18822
18826
|
* self.results = [] # <<<<<<<<<<<<<<
|
|
18827
|
+
* lxb_css_selector_list_destroy_memory(selectors_list)
|
|
18823
18828
|
* return result
|
|
18824
|
-
*
|
|
18825
18829
|
*/
|
|
18826
18830
|
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 74, __pyx_L1_error)
|
|
18827
18831
|
__Pyx_GOTREF(__pyx_t_1);
|
|
@@ -18834,6 +18838,15 @@ static PyObject *__pyx_f_10selectolax_6lexbor_17LexborCSSSelector_any_matches(st
|
|
|
18834
18838
|
/* "selectolax/lexbor/selection.pxi":75
|
|
18835
18839
|
* result = bool(self.results)
|
|
18836
18840
|
* self.results = []
|
|
18841
|
+
* lxb_css_selector_list_destroy_memory(selectors_list) # <<<<<<<<<<<<<<
|
|
18842
|
+
* return result
|
|
18843
|
+
*
|
|
18844
|
+
*/
|
|
18845
|
+
lxb_css_selector_list_destroy_memory(__pyx_v_selectors_list);
|
|
18846
|
+
|
|
18847
|
+
/* "selectolax/lexbor/selection.pxi":76
|
|
18848
|
+
* self.results = []
|
|
18849
|
+
* lxb_css_selector_list_destroy_memory(selectors_list)
|
|
18837
18850
|
* return result # <<<<<<<<<<<<<<
|
|
18838
18851
|
*
|
|
18839
18852
|
*
|
|
@@ -18964,7 +18977,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_17LexborCSSSelector_4any_matches(
|
|
|
18964
18977
|
return __pyx_r;
|
|
18965
18978
|
}
|
|
18966
18979
|
|
|
18967
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
18980
|
+
/* "selectolax/lexbor/selection.pxi":79
|
|
18968
18981
|
*
|
|
18969
18982
|
*
|
|
18970
18983
|
* def __dealloc__(self): # <<<<<<<<<<<<<<
|
|
@@ -18987,7 +19000,7 @@ static void __pyx_pf_10selectolax_6lexbor_17LexborCSSSelector_6__dealloc__(struc
|
|
|
18987
19000
|
__Pyx_RefNannyDeclarations
|
|
18988
19001
|
__Pyx_RefNannySetupContext("__dealloc__", 0);
|
|
18989
19002
|
|
|
18990
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19003
|
+
/* "selectolax/lexbor/selection.pxi":80
|
|
18991
19004
|
*
|
|
18992
19005
|
* def __dealloc__(self):
|
|
18993
19006
|
* lxb_selectors_destroy(self.selectors, True) # <<<<<<<<<<<<<<
|
|
@@ -18996,7 +19009,7 @@ static void __pyx_pf_10selectolax_6lexbor_17LexborCSSSelector_6__dealloc__(struc
|
|
|
18996
19009
|
*/
|
|
18997
19010
|
(void)(lxb_selectors_destroy(__pyx_v_self->selectors, 1));
|
|
18998
19011
|
|
|
18999
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19012
|
+
/* "selectolax/lexbor/selection.pxi":81
|
|
19000
19013
|
* def __dealloc__(self):
|
|
19001
19014
|
* lxb_selectors_destroy(self.selectors, True)
|
|
19002
19015
|
* lxb_css_parser_destroy(self.parser, True) # <<<<<<<<<<<<<<
|
|
@@ -19005,7 +19018,7 @@ static void __pyx_pf_10selectolax_6lexbor_17LexborCSSSelector_6__dealloc__(struc
|
|
|
19005
19018
|
*/
|
|
19006
19019
|
(void)(lxb_css_parser_destroy(__pyx_v_self->parser, 1));
|
|
19007
19020
|
|
|
19008
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19021
|
+
/* "selectolax/lexbor/selection.pxi":82
|
|
19009
19022
|
* lxb_selectors_destroy(self.selectors, True)
|
|
19010
19023
|
* lxb_css_parser_destroy(self.parser, True)
|
|
19011
19024
|
* lxb_css_selectors_destroy(self.css_selectors, True) # <<<<<<<<<<<<<<
|
|
@@ -19014,7 +19027,7 @@ static void __pyx_pf_10selectolax_6lexbor_17LexborCSSSelector_6__dealloc__(struc
|
|
|
19014
19027
|
*/
|
|
19015
19028
|
(void)(lxb_css_selectors_destroy(__pyx_v_self->css_selectors, 1));
|
|
19016
19029
|
|
|
19017
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19030
|
+
/* "selectolax/lexbor/selection.pxi":79
|
|
19018
19031
|
*
|
|
19019
19032
|
*
|
|
19020
19033
|
* def __dealloc__(self): # <<<<<<<<<<<<<<
|
|
@@ -19357,7 +19370,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_17LexborCSSSelector_10__setstate_
|
|
|
19357
19370
|
return __pyx_r;
|
|
19358
19371
|
}
|
|
19359
19372
|
|
|
19360
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19373
|
+
/* "selectolax/lexbor/selection.pxi":97
|
|
19361
19374
|
* cdef list nodes
|
|
19362
19375
|
*
|
|
19363
19376
|
* def __init__(self, LexborNode node, query): # <<<<<<<<<<<<<<
|
|
@@ -19399,11 +19412,11 @@ static int __pyx_pw_10selectolax_6lexbor_14LexborSelector_1__init__(PyObject *__
|
|
|
19399
19412
|
case 1:
|
|
19400
19413
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_query)) != 0)) kw_args--;
|
|
19401
19414
|
else {
|
|
19402
|
-
__Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(5,
|
|
19415
|
+
__Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(5, 97, __pyx_L3_error)
|
|
19403
19416
|
}
|
|
19404
19417
|
}
|
|
19405
19418
|
if (unlikely(kw_args > 0)) {
|
|
19406
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(5,
|
|
19419
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(5, 97, __pyx_L3_error)
|
|
19407
19420
|
}
|
|
19408
19421
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
19409
19422
|
goto __pyx_L5_argtuple_error;
|
|
@@ -19416,13 +19429,13 @@ static int __pyx_pw_10selectolax_6lexbor_14LexborSelector_1__init__(PyObject *__
|
|
|
19416
19429
|
}
|
|
19417
19430
|
goto __pyx_L4_argument_unpacking_done;
|
|
19418
19431
|
__pyx_L5_argtuple_error:;
|
|
19419
|
-
__Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5,
|
|
19432
|
+
__Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 97, __pyx_L3_error)
|
|
19420
19433
|
__pyx_L3_error:;
|
|
19421
19434
|
__Pyx_AddTraceback("selectolax.lexbor.LexborSelector.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
19422
19435
|
__Pyx_RefNannyFinishContext();
|
|
19423
19436
|
return -1;
|
|
19424
19437
|
__pyx_L4_argument_unpacking_done:;
|
|
19425
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_10selectolax_6lexbor_LexborNode, 1, "node", 0))) __PYX_ERR(5,
|
|
19438
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_10selectolax_6lexbor_LexborNode, 1, "node", 0))) __PYX_ERR(5, 97, __pyx_L1_error)
|
|
19426
19439
|
__pyx_r = __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(((struct __pyx_obj_10selectolax_6lexbor_LexborSelector *)__pyx_v_self), __pyx_v_node, __pyx_v_query);
|
|
19427
19440
|
|
|
19428
19441
|
/* function exit code */
|
|
@@ -19449,7 +19462,7 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19449
19462
|
int __pyx_clineno = 0;
|
|
19450
19463
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
19451
19464
|
|
|
19452
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19465
|
+
/* "selectolax/lexbor/selection.pxi":98
|
|
19453
19466
|
*
|
|
19454
19467
|
* def __init__(self, LexborNode node, query):
|
|
19455
19468
|
* self.node = node # <<<<<<<<<<<<<<
|
|
@@ -19462,18 +19475,18 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19462
19475
|
__Pyx_DECREF(((PyObject *)__pyx_v_self->node));
|
|
19463
19476
|
__pyx_v_self->node = __pyx_v_node;
|
|
19464
19477
|
|
|
19465
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19478
|
+
/* "selectolax/lexbor/selection.pxi":99
|
|
19466
19479
|
* def __init__(self, LexborNode node, query):
|
|
19467
19480
|
* self.node = node
|
|
19468
19481
|
* self.nodes = self.node.parser.selector.find(query, self.node) if query else [node, ] # <<<<<<<<<<<<<<
|
|
19469
19482
|
*
|
|
19470
19483
|
*
|
|
19471
19484
|
*/
|
|
19472
|
-
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_query); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5,
|
|
19485
|
+
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_query); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5, 99, __pyx_L1_error)
|
|
19473
19486
|
if (__pyx_t_2) {
|
|
19474
|
-
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->node->parser), __pyx_n_s_selector); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
19487
|
+
__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)
|
|
19475
19488
|
__Pyx_GOTREF(__pyx_t_4);
|
|
19476
|
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
19489
|
+
__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)
|
|
19477
19490
|
__Pyx_GOTREF(__pyx_t_5);
|
|
19478
19491
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
19479
19492
|
__pyx_t_4 = NULL;
|
|
@@ -19491,7 +19504,7 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19491
19504
|
#if CYTHON_FAST_PYCALL
|
|
19492
19505
|
if (PyFunction_Check(__pyx_t_5)) {
|
|
19493
19506
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_query, ((PyObject *)__pyx_v_self->node)};
|
|
19494
|
-
__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,
|
|
19507
|
+
__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)
|
|
19495
19508
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
19496
19509
|
__Pyx_GOTREF(__pyx_t_3);
|
|
19497
19510
|
} else
|
|
@@ -19499,13 +19512,13 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19499
19512
|
#if CYTHON_FAST_PYCCALL
|
|
19500
19513
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
|
|
19501
19514
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_query, ((PyObject *)__pyx_v_self->node)};
|
|
19502
|
-
__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,
|
|
19515
|
+
__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)
|
|
19503
19516
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
19504
19517
|
__Pyx_GOTREF(__pyx_t_3);
|
|
19505
19518
|
} else
|
|
19506
19519
|
#endif
|
|
19507
19520
|
{
|
|
19508
|
-
__pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5,
|
|
19521
|
+
__pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 99, __pyx_L1_error)
|
|
19509
19522
|
__Pyx_GOTREF(__pyx_t_7);
|
|
19510
19523
|
if (__pyx_t_4) {
|
|
19511
19524
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
@@ -19516,16 +19529,16 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19516
19529
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->node));
|
|
19517
19530
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->node));
|
|
19518
19531
|
PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_self->node));
|
|
19519
|
-
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
19532
|
+
__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)
|
|
19520
19533
|
__Pyx_GOTREF(__pyx_t_3);
|
|
19521
19534
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
19522
19535
|
}
|
|
19523
19536
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
19524
|
-
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,
|
|
19537
|
+
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)
|
|
19525
19538
|
__pyx_t_1 = __pyx_t_3;
|
|
19526
19539
|
__pyx_t_3 = 0;
|
|
19527
19540
|
} else {
|
|
19528
|
-
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
19541
|
+
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 99, __pyx_L1_error)
|
|
19529
19542
|
__Pyx_GOTREF(__pyx_t_3);
|
|
19530
19543
|
__Pyx_INCREF(((PyObject *)__pyx_v_node));
|
|
19531
19544
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_node));
|
|
@@ -19539,7 +19552,7 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19539
19552
|
__pyx_v_self->nodes = ((PyObject*)__pyx_t_1);
|
|
19540
19553
|
__pyx_t_1 = 0;
|
|
19541
19554
|
|
|
19542
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19555
|
+
/* "selectolax/lexbor/selection.pxi":97
|
|
19543
19556
|
* cdef list nodes
|
|
19544
19557
|
*
|
|
19545
19558
|
* def __init__(self, LexborNode node, query): # <<<<<<<<<<<<<<
|
|
@@ -19563,7 +19576,7 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector___init__(struct __pyx_
|
|
|
19563
19576
|
return __pyx_r;
|
|
19564
19577
|
}
|
|
19565
19578
|
|
|
19566
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19579
|
+
/* "selectolax/lexbor/selection.pxi":102
|
|
19567
19580
|
*
|
|
19568
19581
|
*
|
|
19569
19582
|
* cpdef css(self, str query): # <<<<<<<<<<<<<<
|
|
@@ -19592,7 +19605,7 @@ static PyObject *__pyx_f_10selectolax_6lexbor_14LexborSelector_css(CYTHON_UNUSED
|
|
|
19592
19605
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
19593
19606
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
19594
19607
|
#endif
|
|
19595
|
-
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_css); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
19608
|
+
__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)
|
|
19596
19609
|
__Pyx_GOTREF(__pyx_t_1);
|
|
19597
19610
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_10selectolax_6lexbor_14LexborSelector_3css)) {
|
|
19598
19611
|
__Pyx_XDECREF(__pyx_r);
|
|
@@ -19609,7 +19622,7 @@ static PyObject *__pyx_f_10selectolax_6lexbor_14LexborSelector_css(CYTHON_UNUSED
|
|
|
19609
19622
|
}
|
|
19610
19623
|
__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);
|
|
19611
19624
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
19612
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(5,
|
|
19625
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 102, __pyx_L1_error)
|
|
19613
19626
|
__Pyx_GOTREF(__pyx_t_2);
|
|
19614
19627
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
19615
19628
|
__pyx_r = __pyx_t_2;
|
|
@@ -19630,14 +19643,14 @@ static PyObject *__pyx_f_10selectolax_6lexbor_14LexborSelector_css(CYTHON_UNUSED
|
|
|
19630
19643
|
#endif
|
|
19631
19644
|
}
|
|
19632
19645
|
|
|
19633
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19646
|
+
/* "selectolax/lexbor/selection.pxi":104
|
|
19634
19647
|
* cpdef css(self, str query):
|
|
19635
19648
|
* """Evaluate CSS selector against current scope."""
|
|
19636
19649
|
* raise SelectolaxError("This features is not supported by the lexbor backend. Please use Modest backend.") # <<<<<<<<<<<<<<
|
|
19637
19650
|
*
|
|
19638
19651
|
* @property
|
|
19639
19652
|
*/
|
|
19640
|
-
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SelectolaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(5,
|
|
19653
|
+
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SelectolaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 104, __pyx_L1_error)
|
|
19641
19654
|
__Pyx_GOTREF(__pyx_t_2);
|
|
19642
19655
|
__pyx_t_3 = NULL;
|
|
19643
19656
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
@@ -19651,14 +19664,14 @@ static PyObject *__pyx_f_10selectolax_6lexbor_14LexborSelector_css(CYTHON_UNUSED
|
|
|
19651
19664
|
}
|
|
19652
19665
|
__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);
|
|
19653
19666
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
19654
|
-
if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
19667
|
+
if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 104, __pyx_L1_error)
|
|
19655
19668
|
__Pyx_GOTREF(__pyx_t_1);
|
|
19656
19669
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
19657
19670
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
19658
19671
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
19659
|
-
__PYX_ERR(5,
|
|
19672
|
+
__PYX_ERR(5, 104, __pyx_L1_error)
|
|
19660
19673
|
|
|
19661
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19674
|
+
/* "selectolax/lexbor/selection.pxi":102
|
|
19662
19675
|
*
|
|
19663
19676
|
*
|
|
19664
19677
|
* cpdef css(self, str query): # <<<<<<<<<<<<<<
|
|
@@ -19690,7 +19703,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_3css(PyObject *_
|
|
|
19690
19703
|
PyObject *__pyx_r = 0;
|
|
19691
19704
|
__Pyx_RefNannyDeclarations
|
|
19692
19705
|
__Pyx_RefNannySetupContext("css (wrapper)", 0);
|
|
19693
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_query), (&PyUnicode_Type), 1, "query", 1))) __PYX_ERR(5,
|
|
19706
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_query), (&PyUnicode_Type), 1, "query", 1))) __PYX_ERR(5, 102, __pyx_L1_error)
|
|
19694
19707
|
__pyx_r = __pyx_pf_10selectolax_6lexbor_14LexborSelector_2css(((struct __pyx_obj_10selectolax_6lexbor_LexborSelector *)__pyx_v_self), ((PyObject*)__pyx_v_query));
|
|
19695
19708
|
|
|
19696
19709
|
/* function exit code */
|
|
@@ -19711,7 +19724,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_2css(struct __py
|
|
|
19711
19724
|
int __pyx_clineno = 0;
|
|
19712
19725
|
__Pyx_RefNannySetupContext("css", 0);
|
|
19713
19726
|
__Pyx_XDECREF(__pyx_r);
|
|
19714
|
-
__pyx_t_1 = __pyx_f_10selectolax_6lexbor_14LexborSelector_css(__pyx_v_self, __pyx_v_query, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
19727
|
+
__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)
|
|
19715
19728
|
__Pyx_GOTREF(__pyx_t_1);
|
|
19716
19729
|
__pyx_r = __pyx_t_1;
|
|
19717
19730
|
__pyx_t_1 = 0;
|
|
@@ -19728,7 +19741,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_2css(struct __py
|
|
|
19728
19741
|
return __pyx_r;
|
|
19729
19742
|
}
|
|
19730
19743
|
|
|
19731
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19744
|
+
/* "selectolax/lexbor/selection.pxi":107
|
|
19732
19745
|
*
|
|
19733
19746
|
* @property
|
|
19734
19747
|
* def matches(self): # <<<<<<<<<<<<<<
|
|
@@ -19754,7 +19767,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_7matches___get__
|
|
|
19754
19767
|
__Pyx_RefNannyDeclarations
|
|
19755
19768
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
19756
19769
|
|
|
19757
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19770
|
+
/* "selectolax/lexbor/selection.pxi":109
|
|
19758
19771
|
* def matches(self):
|
|
19759
19772
|
* """Returns all possible matches"""
|
|
19760
19773
|
* return self.nodes # <<<<<<<<<<<<<<
|
|
@@ -19766,7 +19779,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_7matches___get__
|
|
|
19766
19779
|
__pyx_r = __pyx_v_self->nodes;
|
|
19767
19780
|
goto __pyx_L0;
|
|
19768
19781
|
|
|
19769
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19782
|
+
/* "selectolax/lexbor/selection.pxi":107
|
|
19770
19783
|
*
|
|
19771
19784
|
* @property
|
|
19772
19785
|
* def matches(self): # <<<<<<<<<<<<<<
|
|
@@ -19781,7 +19794,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_7matches___get__
|
|
|
19781
19794
|
return __pyx_r;
|
|
19782
19795
|
}
|
|
19783
19796
|
|
|
19784
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19797
|
+
/* "selectolax/lexbor/selection.pxi":112
|
|
19785
19798
|
*
|
|
19786
19799
|
* @property
|
|
19787
19800
|
* def any_matches(self): # <<<<<<<<<<<<<<
|
|
@@ -19811,7 +19824,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_11any_matches___
|
|
|
19811
19824
|
int __pyx_clineno = 0;
|
|
19812
19825
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
19813
19826
|
|
|
19814
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19827
|
+
/* "selectolax/lexbor/selection.pxi":114
|
|
19815
19828
|
* def any_matches(self):
|
|
19816
19829
|
* """Returns True if there are any matches"""
|
|
19817
19830
|
* return bool(self.nodes) # <<<<<<<<<<<<<<
|
|
@@ -19819,13 +19832,13 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_11any_matches___
|
|
|
19819
19832
|
* def text_contains(self, str text, bool deep=True, str separator='', bool strip=False):
|
|
19820
19833
|
*/
|
|
19821
19834
|
__Pyx_XDECREF(__pyx_r);
|
|
19822
|
-
__pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cpython_4bool_bool), __pyx_v_self->nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
19835
|
+
__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)
|
|
19823
19836
|
__Pyx_GOTREF(__pyx_t_1);
|
|
19824
19837
|
__pyx_r = __pyx_t_1;
|
|
19825
19838
|
__pyx_t_1 = 0;
|
|
19826
19839
|
goto __pyx_L0;
|
|
19827
19840
|
|
|
19828
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19841
|
+
/* "selectolax/lexbor/selection.pxi":112
|
|
19829
19842
|
*
|
|
19830
19843
|
* @property
|
|
19831
19844
|
* def any_matches(self): # <<<<<<<<<<<<<<
|
|
@@ -19844,7 +19857,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_11any_matches___
|
|
|
19844
19857
|
return __pyx_r;
|
|
19845
19858
|
}
|
|
19846
19859
|
|
|
19847
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19860
|
+
/* "selectolax/lexbor/selection.pxi":116
|
|
19848
19861
|
* return bool(self.nodes)
|
|
19849
19862
|
*
|
|
19850
19863
|
* def text_contains(self, str text, bool deep=True, str separator='', bool strip=False): # <<<<<<<<<<<<<<
|
|
@@ -19912,7 +19925,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_5text_contains(P
|
|
|
19912
19925
|
}
|
|
19913
19926
|
}
|
|
19914
19927
|
if (unlikely(kw_args > 0)) {
|
|
19915
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "text_contains") < 0)) __PYX_ERR(5,
|
|
19928
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "text_contains") < 0)) __PYX_ERR(5, 116, __pyx_L3_error)
|
|
19916
19929
|
}
|
|
19917
19930
|
} else {
|
|
19918
19931
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
@@ -19934,16 +19947,16 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_5text_contains(P
|
|
|
19934
19947
|
}
|
|
19935
19948
|
goto __pyx_L4_argument_unpacking_done;
|
|
19936
19949
|
__pyx_L5_argtuple_error:;
|
|
19937
|
-
__Pyx_RaiseArgtupleInvalid("text_contains", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5,
|
|
19950
|
+
__Pyx_RaiseArgtupleInvalid("text_contains", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 116, __pyx_L3_error)
|
|
19938
19951
|
__pyx_L3_error:;
|
|
19939
19952
|
__Pyx_AddTraceback("selectolax.lexbor.LexborSelector.text_contains", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
19940
19953
|
__Pyx_RefNannyFinishContext();
|
|
19941
19954
|
return NULL;
|
|
19942
19955
|
__pyx_L4_argument_unpacking_done:;
|
|
19943
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyUnicode_Type), 1, "text", 1))) __PYX_ERR(5,
|
|
19944
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_deep), __pyx_ptype_7cpython_4bool_bool, 1, "deep", 0))) __PYX_ERR(5,
|
|
19945
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_separator), (&PyUnicode_Type), 1, "separator", 1))) __PYX_ERR(5,
|
|
19946
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strip), __pyx_ptype_7cpython_4bool_bool, 1, "strip", 0))) __PYX_ERR(5,
|
|
19956
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyUnicode_Type), 1, "text", 1))) __PYX_ERR(5, 116, __pyx_L1_error)
|
|
19957
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_deep), __pyx_ptype_7cpython_4bool_bool, 1, "deep", 0))) __PYX_ERR(5, 116, __pyx_L1_error)
|
|
19958
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_separator), (&PyUnicode_Type), 1, "separator", 1))) __PYX_ERR(5, 116, __pyx_L1_error)
|
|
19959
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strip), __pyx_ptype_7cpython_4bool_bool, 1, "strip", 0))) __PYX_ERR(5, 116, __pyx_L1_error)
|
|
19947
19960
|
__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);
|
|
19948
19961
|
|
|
19949
19962
|
/* function exit code */
|
|
@@ -19975,19 +19988,19 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
19975
19988
|
int __pyx_clineno = 0;
|
|
19976
19989
|
__Pyx_RefNannySetupContext("text_contains", 0);
|
|
19977
19990
|
|
|
19978
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
19991
|
+
/* "selectolax/lexbor/selection.pxi":118
|
|
19979
19992
|
* def text_contains(self, str text, bool deep=True, str separator='', bool strip=False):
|
|
19980
19993
|
* """Filter all current matches given text."""
|
|
19981
19994
|
* nodes = [] # <<<<<<<<<<<<<<
|
|
19982
19995
|
* for node in self.nodes:
|
|
19983
19996
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
19984
19997
|
*/
|
|
19985
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
19998
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 118, __pyx_L1_error)
|
|
19986
19999
|
__Pyx_GOTREF(__pyx_t_1);
|
|
19987
20000
|
__pyx_v_nodes = ((PyObject*)__pyx_t_1);
|
|
19988
20001
|
__pyx_t_1 = 0;
|
|
19989
20002
|
|
|
19990
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20003
|
+
/* "selectolax/lexbor/selection.pxi":119
|
|
19991
20004
|
* """Filter all current matches given text."""
|
|
19992
20005
|
* nodes = []
|
|
19993
20006
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -19996,70 +20009,70 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
19996
20009
|
*/
|
|
19997
20010
|
if (unlikely(__pyx_v_self->nodes == Py_None)) {
|
|
19998
20011
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
19999
|
-
__PYX_ERR(5,
|
|
20012
|
+
__PYX_ERR(5, 119, __pyx_L1_error)
|
|
20000
20013
|
}
|
|
20001
20014
|
__pyx_t_1 = __pyx_v_self->nodes; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
|
|
20002
20015
|
for (;;) {
|
|
20003
20016
|
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
|
|
20004
20017
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
20005
|
-
__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,
|
|
20018
|
+
__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)
|
|
20006
20019
|
#else
|
|
20007
|
-
__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20020
|
+
__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)
|
|
20008
20021
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20009
20022
|
#endif
|
|
20010
20023
|
__Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_3);
|
|
20011
20024
|
__pyx_t_3 = 0;
|
|
20012
20025
|
|
|
20013
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20026
|
+
/* "selectolax/lexbor/selection.pxi":120
|
|
20014
20027
|
* nodes = []
|
|
20015
20028
|
* for node in self.nodes:
|
|
20016
20029
|
* node_text = node.text(deep=deep, separator=separator, strip=strip) # <<<<<<<<<<<<<<
|
|
20017
20030
|
* if node_text and text in node_text:
|
|
20018
20031
|
* nodes.append(node)
|
|
20019
20032
|
*/
|
|
20020
|
-
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20033
|
+
__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)
|
|
20021
20034
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20022
|
-
__pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
20035
|
+
__pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 120, __pyx_L1_error)
|
|
20023
20036
|
__Pyx_GOTREF(__pyx_t_4);
|
|
20024
|
-
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_deep, ((PyObject *)__pyx_v_deep)) < 0) __PYX_ERR(5,
|
|
20025
|
-
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_separator, __pyx_v_separator) < 0) __PYX_ERR(5,
|
|
20026
|
-
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_strip, ((PyObject *)__pyx_v_strip)) < 0) __PYX_ERR(5,
|
|
20027
|
-
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20037
|
+
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_deep, ((PyObject *)__pyx_v_deep)) < 0) __PYX_ERR(5, 120, __pyx_L1_error)
|
|
20038
|
+
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_separator, __pyx_v_separator) < 0) __PYX_ERR(5, 120, __pyx_L1_error)
|
|
20039
|
+
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_strip, ((PyObject *)__pyx_v_strip)) < 0) __PYX_ERR(5, 120, __pyx_L1_error)
|
|
20040
|
+
__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)
|
|
20028
20041
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20029
20042
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
20030
20043
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20031
20044
|
__Pyx_XDECREF_SET(__pyx_v_node_text, __pyx_t_5);
|
|
20032
20045
|
__pyx_t_5 = 0;
|
|
20033
20046
|
|
|
20034
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20047
|
+
/* "selectolax/lexbor/selection.pxi":121
|
|
20035
20048
|
* for node in self.nodes:
|
|
20036
20049
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20037
20050
|
* if node_text and text in node_text: # <<<<<<<<<<<<<<
|
|
20038
20051
|
* nodes.append(node)
|
|
20039
20052
|
* self.nodes = nodes
|
|
20040
20053
|
*/
|
|
20041
|
-
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_node_text); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20054
|
+
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_node_text); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5, 121, __pyx_L1_error)
|
|
20042
20055
|
if (__pyx_t_7) {
|
|
20043
20056
|
} else {
|
|
20044
20057
|
__pyx_t_6 = __pyx_t_7;
|
|
20045
20058
|
goto __pyx_L6_bool_binop_done;
|
|
20046
20059
|
}
|
|
20047
|
-
__pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_text, __pyx_v_node_text, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20060
|
+
__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)
|
|
20048
20061
|
__pyx_t_8 = (__pyx_t_7 != 0);
|
|
20049
20062
|
__pyx_t_6 = __pyx_t_8;
|
|
20050
20063
|
__pyx_L6_bool_binop_done:;
|
|
20051
20064
|
if (__pyx_t_6) {
|
|
20052
20065
|
|
|
20053
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20066
|
+
/* "selectolax/lexbor/selection.pxi":122
|
|
20054
20067
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20055
20068
|
* if node_text and text in node_text:
|
|
20056
20069
|
* nodes.append(node) # <<<<<<<<<<<<<<
|
|
20057
20070
|
* self.nodes = nodes
|
|
20058
20071
|
* return self
|
|
20059
20072
|
*/
|
|
20060
|
-
__pyx_t_9 = __Pyx_PyList_Append(__pyx_v_nodes, __pyx_v_node); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5,
|
|
20073
|
+
__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)
|
|
20061
20074
|
|
|
20062
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20075
|
+
/* "selectolax/lexbor/selection.pxi":121
|
|
20063
20076
|
* for node in self.nodes:
|
|
20064
20077
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20065
20078
|
* if node_text and text in node_text: # <<<<<<<<<<<<<<
|
|
@@ -20068,7 +20081,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
20068
20081
|
*/
|
|
20069
20082
|
}
|
|
20070
20083
|
|
|
20071
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20084
|
+
/* "selectolax/lexbor/selection.pxi":119
|
|
20072
20085
|
* """Filter all current matches given text."""
|
|
20073
20086
|
* nodes = []
|
|
20074
20087
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -20078,7 +20091,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
20078
20091
|
}
|
|
20079
20092
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
20080
20093
|
|
|
20081
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20094
|
+
/* "selectolax/lexbor/selection.pxi":123
|
|
20082
20095
|
* if node_text and text in node_text:
|
|
20083
20096
|
* nodes.append(node)
|
|
20084
20097
|
* self.nodes = nodes # <<<<<<<<<<<<<<
|
|
@@ -20091,7 +20104,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
20091
20104
|
__Pyx_DECREF(__pyx_v_self->nodes);
|
|
20092
20105
|
__pyx_v_self->nodes = __pyx_v_nodes;
|
|
20093
20106
|
|
|
20094
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20107
|
+
/* "selectolax/lexbor/selection.pxi":124
|
|
20095
20108
|
* nodes.append(node)
|
|
20096
20109
|
* self.nodes = nodes
|
|
20097
20110
|
* return self # <<<<<<<<<<<<<<
|
|
@@ -20103,7 +20116,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
20103
20116
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
20104
20117
|
goto __pyx_L0;
|
|
20105
20118
|
|
|
20106
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20119
|
+
/* "selectolax/lexbor/selection.pxi":116
|
|
20107
20120
|
* return bool(self.nodes)
|
|
20108
20121
|
*
|
|
20109
20122
|
* def text_contains(self, str text, bool deep=True, str separator='', bool strip=False): # <<<<<<<<<<<<<<
|
|
@@ -20128,7 +20141,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_4text_contains(s
|
|
|
20128
20141
|
return __pyx_r;
|
|
20129
20142
|
}
|
|
20130
20143
|
|
|
20131
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20144
|
+
/* "selectolax/lexbor/selection.pxi":126
|
|
20132
20145
|
* return self
|
|
20133
20146
|
*
|
|
20134
20147
|
* def any_text_contains(self, str text, bool deep=True, str separator='', bool strip=False): # <<<<<<<<<<<<<<
|
|
@@ -20196,7 +20209,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_7any_text_contai
|
|
|
20196
20209
|
}
|
|
20197
20210
|
}
|
|
20198
20211
|
if (unlikely(kw_args > 0)) {
|
|
20199
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "any_text_contains") < 0)) __PYX_ERR(5,
|
|
20212
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "any_text_contains") < 0)) __PYX_ERR(5, 126, __pyx_L3_error)
|
|
20200
20213
|
}
|
|
20201
20214
|
} else {
|
|
20202
20215
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
@@ -20218,16 +20231,16 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_7any_text_contai
|
|
|
20218
20231
|
}
|
|
20219
20232
|
goto __pyx_L4_argument_unpacking_done;
|
|
20220
20233
|
__pyx_L5_argtuple_error:;
|
|
20221
|
-
__Pyx_RaiseArgtupleInvalid("any_text_contains", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5,
|
|
20234
|
+
__Pyx_RaiseArgtupleInvalid("any_text_contains", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 126, __pyx_L3_error)
|
|
20222
20235
|
__pyx_L3_error:;
|
|
20223
20236
|
__Pyx_AddTraceback("selectolax.lexbor.LexborSelector.any_text_contains", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
20224
20237
|
__Pyx_RefNannyFinishContext();
|
|
20225
20238
|
return NULL;
|
|
20226
20239
|
__pyx_L4_argument_unpacking_done:;
|
|
20227
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyUnicode_Type), 1, "text", 1))) __PYX_ERR(5,
|
|
20228
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_deep), __pyx_ptype_7cpython_4bool_bool, 1, "deep", 0))) __PYX_ERR(5,
|
|
20229
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_separator), (&PyUnicode_Type), 1, "separator", 1))) __PYX_ERR(5,
|
|
20230
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strip), __pyx_ptype_7cpython_4bool_bool, 1, "strip", 0))) __PYX_ERR(5,
|
|
20240
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyUnicode_Type), 1, "text", 1))) __PYX_ERR(5, 126, __pyx_L1_error)
|
|
20241
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_deep), __pyx_ptype_7cpython_4bool_bool, 1, "deep", 0))) __PYX_ERR(5, 126, __pyx_L1_error)
|
|
20242
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_separator), (&PyUnicode_Type), 1, "separator", 1))) __PYX_ERR(5, 126, __pyx_L1_error)
|
|
20243
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strip), __pyx_ptype_7cpython_4bool_bool, 1, "strip", 0))) __PYX_ERR(5, 126, __pyx_L1_error)
|
|
20231
20244
|
__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);
|
|
20232
20245
|
|
|
20233
20246
|
/* function exit code */
|
|
@@ -20258,19 +20271,19 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20258
20271
|
int __pyx_clineno = 0;
|
|
20259
20272
|
__Pyx_RefNannySetupContext("any_text_contains", 0);
|
|
20260
20273
|
|
|
20261
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20274
|
+
/* "selectolax/lexbor/selection.pxi":128
|
|
20262
20275
|
* def any_text_contains(self, str text, bool deep=True, str separator='', bool strip=False):
|
|
20263
20276
|
* """Returns True if any node in the current search scope contains specified text"""
|
|
20264
20277
|
* nodes = [] # <<<<<<<<<<<<<<
|
|
20265
20278
|
* for node in self.nodes:
|
|
20266
20279
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20267
20280
|
*/
|
|
20268
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
20281
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 128, __pyx_L1_error)
|
|
20269
20282
|
__Pyx_GOTREF(__pyx_t_1);
|
|
20270
20283
|
__pyx_v_nodes = ((PyObject*)__pyx_t_1);
|
|
20271
20284
|
__pyx_t_1 = 0;
|
|
20272
20285
|
|
|
20273
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20286
|
+
/* "selectolax/lexbor/selection.pxi":129
|
|
20274
20287
|
* """Returns True if any node in the current search scope contains specified text"""
|
|
20275
20288
|
* nodes = []
|
|
20276
20289
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -20279,61 +20292,61 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20279
20292
|
*/
|
|
20280
20293
|
if (unlikely(__pyx_v_self->nodes == Py_None)) {
|
|
20281
20294
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
20282
|
-
__PYX_ERR(5,
|
|
20295
|
+
__PYX_ERR(5, 129, __pyx_L1_error)
|
|
20283
20296
|
}
|
|
20284
20297
|
__pyx_t_1 = __pyx_v_self->nodes; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
|
|
20285
20298
|
for (;;) {
|
|
20286
20299
|
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
|
|
20287
20300
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
20288
|
-
__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,
|
|
20301
|
+
__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)
|
|
20289
20302
|
#else
|
|
20290
|
-
__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20303
|
+
__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)
|
|
20291
20304
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20292
20305
|
#endif
|
|
20293
20306
|
__Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_3);
|
|
20294
20307
|
__pyx_t_3 = 0;
|
|
20295
20308
|
|
|
20296
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20309
|
+
/* "selectolax/lexbor/selection.pxi":130
|
|
20297
20310
|
* nodes = []
|
|
20298
20311
|
* for node in self.nodes:
|
|
20299
20312
|
* node_text = node.text(deep=deep, separator=separator, strip=strip) # <<<<<<<<<<<<<<
|
|
20300
20313
|
* if node_text and text in node_text:
|
|
20301
20314
|
* return True
|
|
20302
20315
|
*/
|
|
20303
|
-
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20316
|
+
__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)
|
|
20304
20317
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20305
|
-
__pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
20318
|
+
__pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 130, __pyx_L1_error)
|
|
20306
20319
|
__Pyx_GOTREF(__pyx_t_4);
|
|
20307
|
-
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_deep, ((PyObject *)__pyx_v_deep)) < 0) __PYX_ERR(5,
|
|
20308
|
-
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_separator, __pyx_v_separator) < 0) __PYX_ERR(5,
|
|
20309
|
-
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_strip, ((PyObject *)__pyx_v_strip)) < 0) __PYX_ERR(5,
|
|
20310
|
-
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20320
|
+
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_deep, ((PyObject *)__pyx_v_deep)) < 0) __PYX_ERR(5, 130, __pyx_L1_error)
|
|
20321
|
+
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_separator, __pyx_v_separator) < 0) __PYX_ERR(5, 130, __pyx_L1_error)
|
|
20322
|
+
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_strip, ((PyObject *)__pyx_v_strip)) < 0) __PYX_ERR(5, 130, __pyx_L1_error)
|
|
20323
|
+
__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)
|
|
20311
20324
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20312
20325
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
20313
20326
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20314
20327
|
__Pyx_XDECREF_SET(__pyx_v_node_text, __pyx_t_5);
|
|
20315
20328
|
__pyx_t_5 = 0;
|
|
20316
20329
|
|
|
20317
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20330
|
+
/* "selectolax/lexbor/selection.pxi":131
|
|
20318
20331
|
* for node in self.nodes:
|
|
20319
20332
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20320
20333
|
* if node_text and text in node_text: # <<<<<<<<<<<<<<
|
|
20321
20334
|
* return True
|
|
20322
20335
|
* return False
|
|
20323
20336
|
*/
|
|
20324
|
-
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_node_text); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20337
|
+
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_node_text); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5, 131, __pyx_L1_error)
|
|
20325
20338
|
if (__pyx_t_7) {
|
|
20326
20339
|
} else {
|
|
20327
20340
|
__pyx_t_6 = __pyx_t_7;
|
|
20328
20341
|
goto __pyx_L6_bool_binop_done;
|
|
20329
20342
|
}
|
|
20330
|
-
__pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_text, __pyx_v_node_text, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20343
|
+
__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)
|
|
20331
20344
|
__pyx_t_8 = (__pyx_t_7 != 0);
|
|
20332
20345
|
__pyx_t_6 = __pyx_t_8;
|
|
20333
20346
|
__pyx_L6_bool_binop_done:;
|
|
20334
20347
|
if (__pyx_t_6) {
|
|
20335
20348
|
|
|
20336
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20349
|
+
/* "selectolax/lexbor/selection.pxi":132
|
|
20337
20350
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20338
20351
|
* if node_text and text in node_text:
|
|
20339
20352
|
* return True # <<<<<<<<<<<<<<
|
|
@@ -20346,7 +20359,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20346
20359
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
20347
20360
|
goto __pyx_L0;
|
|
20348
20361
|
|
|
20349
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20362
|
+
/* "selectolax/lexbor/selection.pxi":131
|
|
20350
20363
|
* for node in self.nodes:
|
|
20351
20364
|
* node_text = node.text(deep=deep, separator=separator, strip=strip)
|
|
20352
20365
|
* if node_text and text in node_text: # <<<<<<<<<<<<<<
|
|
@@ -20355,7 +20368,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20355
20368
|
*/
|
|
20356
20369
|
}
|
|
20357
20370
|
|
|
20358
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20371
|
+
/* "selectolax/lexbor/selection.pxi":129
|
|
20359
20372
|
* """Returns True if any node in the current search scope contains specified text"""
|
|
20360
20373
|
* nodes = []
|
|
20361
20374
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -20365,7 +20378,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20365
20378
|
}
|
|
20366
20379
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
20367
20380
|
|
|
20368
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20381
|
+
/* "selectolax/lexbor/selection.pxi":133
|
|
20369
20382
|
* if node_text and text in node_text:
|
|
20370
20383
|
* return True
|
|
20371
20384
|
* return False # <<<<<<<<<<<<<<
|
|
@@ -20377,7 +20390,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20377
20390
|
__pyx_r = Py_False;
|
|
20378
20391
|
goto __pyx_L0;
|
|
20379
20392
|
|
|
20380
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20393
|
+
/* "selectolax/lexbor/selection.pxi":126
|
|
20381
20394
|
* return self
|
|
20382
20395
|
*
|
|
20383
20396
|
* def any_text_contains(self, str text, bool deep=True, str separator='', bool strip=False): # <<<<<<<<<<<<<<
|
|
@@ -20402,7 +20415,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_6any_text_contai
|
|
|
20402
20415
|
return __pyx_r;
|
|
20403
20416
|
}
|
|
20404
20417
|
|
|
20405
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20418
|
+
/* "selectolax/lexbor/selection.pxi":135
|
|
20406
20419
|
* return False
|
|
20407
20420
|
*
|
|
20408
20421
|
* def attribute_longer_than(self, str attribute, int length, str start = None): # <<<<<<<<<<<<<<
|
|
@@ -20449,7 +20462,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_9attribute_longe
|
|
|
20449
20462
|
case 1:
|
|
20450
20463
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--;
|
|
20451
20464
|
else {
|
|
20452
|
-
__Pyx_RaiseArgtupleInvalid("attribute_longer_than", 0, 2, 3, 1); __PYX_ERR(5,
|
|
20465
|
+
__Pyx_RaiseArgtupleInvalid("attribute_longer_than", 0, 2, 3, 1); __PYX_ERR(5, 135, __pyx_L3_error)
|
|
20453
20466
|
}
|
|
20454
20467
|
CYTHON_FALLTHROUGH;
|
|
20455
20468
|
case 2:
|
|
@@ -20459,7 +20472,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_9attribute_longe
|
|
|
20459
20472
|
}
|
|
20460
20473
|
}
|
|
20461
20474
|
if (unlikely(kw_args > 0)) {
|
|
20462
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "attribute_longer_than") < 0)) __PYX_ERR(5,
|
|
20475
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "attribute_longer_than") < 0)) __PYX_ERR(5, 135, __pyx_L3_error)
|
|
20463
20476
|
}
|
|
20464
20477
|
} else {
|
|
20465
20478
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
@@ -20472,19 +20485,19 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_9attribute_longe
|
|
|
20472
20485
|
}
|
|
20473
20486
|
}
|
|
20474
20487
|
__pyx_v_attribute = ((PyObject*)values[0]);
|
|
20475
|
-
__pyx_v_length = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(5,
|
|
20488
|
+
__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)
|
|
20476
20489
|
__pyx_v_start = ((PyObject*)values[2]);
|
|
20477
20490
|
}
|
|
20478
20491
|
goto __pyx_L4_argument_unpacking_done;
|
|
20479
20492
|
__pyx_L5_argtuple_error:;
|
|
20480
|
-
__Pyx_RaiseArgtupleInvalid("attribute_longer_than", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5,
|
|
20493
|
+
__Pyx_RaiseArgtupleInvalid("attribute_longer_than", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 135, __pyx_L3_error)
|
|
20481
20494
|
__pyx_L3_error:;
|
|
20482
20495
|
__Pyx_AddTraceback("selectolax.lexbor.LexborSelector.attribute_longer_than", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
20483
20496
|
__Pyx_RefNannyFinishContext();
|
|
20484
20497
|
return NULL;
|
|
20485
20498
|
__pyx_L4_argument_unpacking_done:;
|
|
20486
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute), (&PyUnicode_Type), 1, "attribute", 1))) __PYX_ERR(5,
|
|
20487
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), (&PyUnicode_Type), 1, "start", 1))) __PYX_ERR(5,
|
|
20499
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute), (&PyUnicode_Type), 1, "attribute", 1))) __PYX_ERR(5, 135, __pyx_L1_error)
|
|
20500
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), (&PyUnicode_Type), 1, "start", 1))) __PYX_ERR(5, 135, __pyx_L1_error)
|
|
20488
20501
|
__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);
|
|
20489
20502
|
|
|
20490
20503
|
/* function exit code */
|
|
@@ -20517,19 +20530,19 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20517
20530
|
int __pyx_clineno = 0;
|
|
20518
20531
|
__Pyx_RefNannySetupContext("attribute_longer_than", 0);
|
|
20519
20532
|
|
|
20520
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20533
|
+
/* "selectolax/lexbor/selection.pxi":140
|
|
20521
20534
|
* Similar to `string-length` in XPath.
|
|
20522
20535
|
* """
|
|
20523
20536
|
* nodes = [] # <<<<<<<<<<<<<<
|
|
20524
20537
|
* for node in self.nodes:
|
|
20525
20538
|
* attr = node.attributes.get(attribute)
|
|
20526
20539
|
*/
|
|
20527
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
20540
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 140, __pyx_L1_error)
|
|
20528
20541
|
__Pyx_GOTREF(__pyx_t_1);
|
|
20529
20542
|
__pyx_v_nodes = ((PyObject*)__pyx_t_1);
|
|
20530
20543
|
__pyx_t_1 = 0;
|
|
20531
20544
|
|
|
20532
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20545
|
+
/* "selectolax/lexbor/selection.pxi":141
|
|
20533
20546
|
* """
|
|
20534
20547
|
* nodes = []
|
|
20535
20548
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -20538,30 +20551,30 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20538
20551
|
*/
|
|
20539
20552
|
if (unlikely(__pyx_v_self->nodes == Py_None)) {
|
|
20540
20553
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
20541
|
-
__PYX_ERR(5,
|
|
20554
|
+
__PYX_ERR(5, 141, __pyx_L1_error)
|
|
20542
20555
|
}
|
|
20543
20556
|
__pyx_t_1 = __pyx_v_self->nodes; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
|
|
20544
20557
|
for (;;) {
|
|
20545
20558
|
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
|
|
20546
20559
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
20547
|
-
__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,
|
|
20560
|
+
__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)
|
|
20548
20561
|
#else
|
|
20549
|
-
__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20562
|
+
__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)
|
|
20550
20563
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20551
20564
|
#endif
|
|
20552
20565
|
__Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_3);
|
|
20553
20566
|
__pyx_t_3 = 0;
|
|
20554
20567
|
|
|
20555
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20568
|
+
/* "selectolax/lexbor/selection.pxi":142
|
|
20556
20569
|
* nodes = []
|
|
20557
20570
|
* for node in self.nodes:
|
|
20558
20571
|
* attr = node.attributes.get(attribute) # <<<<<<<<<<<<<<
|
|
20559
20572
|
* if attr and start and start in attr:
|
|
20560
20573
|
* attr = attr[attr.find(start) + len(start):]
|
|
20561
20574
|
*/
|
|
20562
|
-
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_attributes_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
20575
|
+
__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)
|
|
20563
20576
|
__Pyx_GOTREF(__pyx_t_4);
|
|
20564
|
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20577
|
+
__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)
|
|
20565
20578
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20566
20579
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20567
20580
|
__pyx_t_4 = NULL;
|
|
@@ -20576,20 +20589,20 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20576
20589
|
}
|
|
20577
20590
|
__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);
|
|
20578
20591
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20579
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20592
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 142, __pyx_L1_error)
|
|
20580
20593
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20581
20594
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
20582
20595
|
__Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_3);
|
|
20583
20596
|
__pyx_t_3 = 0;
|
|
20584
20597
|
|
|
20585
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20598
|
+
/* "selectolax/lexbor/selection.pxi":143
|
|
20586
20599
|
* for node in self.nodes:
|
|
20587
20600
|
* attr = node.attributes.get(attribute)
|
|
20588
20601
|
* if attr and start and start in attr: # <<<<<<<<<<<<<<
|
|
20589
20602
|
* attr = attr[attr.find(start) + len(start):]
|
|
20590
20603
|
* if len(attr) > length:
|
|
20591
20604
|
*/
|
|
20592
|
-
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_attr); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20605
|
+
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_attr); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5, 143, __pyx_L1_error)
|
|
20593
20606
|
if (__pyx_t_7) {
|
|
20594
20607
|
} else {
|
|
20595
20608
|
__pyx_t_6 = __pyx_t_7;
|
|
@@ -20601,20 +20614,20 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20601
20614
|
__pyx_t_6 = __pyx_t_7;
|
|
20602
20615
|
goto __pyx_L6_bool_binop_done;
|
|
20603
20616
|
}
|
|
20604
|
-
__pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_start, __pyx_v_attr, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20617
|
+
__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)
|
|
20605
20618
|
__pyx_t_8 = (__pyx_t_7 != 0);
|
|
20606
20619
|
__pyx_t_6 = __pyx_t_8;
|
|
20607
20620
|
__pyx_L6_bool_binop_done:;
|
|
20608
20621
|
if (__pyx_t_6) {
|
|
20609
20622
|
|
|
20610
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20623
|
+
/* "selectolax/lexbor/selection.pxi":144
|
|
20611
20624
|
* attr = node.attributes.get(attribute)
|
|
20612
20625
|
* if attr and start and start in attr:
|
|
20613
20626
|
* attr = attr[attr.find(start) + len(start):] # <<<<<<<<<<<<<<
|
|
20614
20627
|
* if len(attr) > length:
|
|
20615
20628
|
* nodes.append(node)
|
|
20616
20629
|
*/
|
|
20617
|
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20630
|
+
__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)
|
|
20618
20631
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20619
20632
|
__pyx_t_4 = NULL;
|
|
20620
20633
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
|
|
@@ -20628,27 +20641,27 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20628
20641
|
}
|
|
20629
20642
|
__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);
|
|
20630
20643
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20631
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20644
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 144, __pyx_L1_error)
|
|
20632
20645
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20633
20646
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
20634
20647
|
if (unlikely(__pyx_v_start == Py_None)) {
|
|
20635
20648
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
20636
|
-
__PYX_ERR(5,
|
|
20649
|
+
__PYX_ERR(5, 144, __pyx_L1_error)
|
|
20637
20650
|
}
|
|
20638
|
-
__pyx_t_9 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_start); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5,
|
|
20639
|
-
__pyx_t_5 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20651
|
+
__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)
|
|
20652
|
+
__pyx_t_5 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 144, __pyx_L1_error)
|
|
20640
20653
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20641
|
-
__pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
20654
|
+
__pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 144, __pyx_L1_error)
|
|
20642
20655
|
__Pyx_GOTREF(__pyx_t_4);
|
|
20643
20656
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
20644
20657
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
20645
|
-
__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,
|
|
20658
|
+
__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)
|
|
20646
20659
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20647
20660
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20648
20661
|
__Pyx_DECREF_SET(__pyx_v_attr, __pyx_t_5);
|
|
20649
20662
|
__pyx_t_5 = 0;
|
|
20650
20663
|
|
|
20651
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20664
|
+
/* "selectolax/lexbor/selection.pxi":143
|
|
20652
20665
|
* for node in self.nodes:
|
|
20653
20666
|
* attr = node.attributes.get(attribute)
|
|
20654
20667
|
* if attr and start and start in attr: # <<<<<<<<<<<<<<
|
|
@@ -20657,27 +20670,27 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20657
20670
|
*/
|
|
20658
20671
|
}
|
|
20659
20672
|
|
|
20660
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20673
|
+
/* "selectolax/lexbor/selection.pxi":145
|
|
20661
20674
|
* if attr and start and start in attr:
|
|
20662
20675
|
* attr = attr[attr.find(start) + len(start):]
|
|
20663
20676
|
* if len(attr) > length: # <<<<<<<<<<<<<<
|
|
20664
20677
|
* nodes.append(node)
|
|
20665
20678
|
* self.nodes = nodes
|
|
20666
20679
|
*/
|
|
20667
|
-
__pyx_t_9 = PyObject_Length(__pyx_v_attr); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5,
|
|
20680
|
+
__pyx_t_9 = PyObject_Length(__pyx_v_attr); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5, 145, __pyx_L1_error)
|
|
20668
20681
|
__pyx_t_6 = ((__pyx_t_9 > __pyx_v_length) != 0);
|
|
20669
20682
|
if (__pyx_t_6) {
|
|
20670
20683
|
|
|
20671
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20684
|
+
/* "selectolax/lexbor/selection.pxi":146
|
|
20672
20685
|
* attr = attr[attr.find(start) + len(start):]
|
|
20673
20686
|
* if len(attr) > length:
|
|
20674
20687
|
* nodes.append(node) # <<<<<<<<<<<<<<
|
|
20675
20688
|
* self.nodes = nodes
|
|
20676
20689
|
* return self
|
|
20677
20690
|
*/
|
|
20678
|
-
__pyx_t_10 = __Pyx_PyList_Append(__pyx_v_nodes, __pyx_v_node); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5,
|
|
20691
|
+
__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)
|
|
20679
20692
|
|
|
20680
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20693
|
+
/* "selectolax/lexbor/selection.pxi":145
|
|
20681
20694
|
* if attr and start and start in attr:
|
|
20682
20695
|
* attr = attr[attr.find(start) + len(start):]
|
|
20683
20696
|
* if len(attr) > length: # <<<<<<<<<<<<<<
|
|
@@ -20686,7 +20699,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20686
20699
|
*/
|
|
20687
20700
|
}
|
|
20688
20701
|
|
|
20689
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20702
|
+
/* "selectolax/lexbor/selection.pxi":141
|
|
20690
20703
|
* """
|
|
20691
20704
|
* nodes = []
|
|
20692
20705
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -20696,7 +20709,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20696
20709
|
}
|
|
20697
20710
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
20698
20711
|
|
|
20699
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20712
|
+
/* "selectolax/lexbor/selection.pxi":147
|
|
20700
20713
|
* if len(attr) > length:
|
|
20701
20714
|
* nodes.append(node)
|
|
20702
20715
|
* self.nodes = nodes # <<<<<<<<<<<<<<
|
|
@@ -20709,7 +20722,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20709
20722
|
__Pyx_DECREF(__pyx_v_self->nodes);
|
|
20710
20723
|
__pyx_v_self->nodes = __pyx_v_nodes;
|
|
20711
20724
|
|
|
20712
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20725
|
+
/* "selectolax/lexbor/selection.pxi":148
|
|
20713
20726
|
* nodes.append(node)
|
|
20714
20727
|
* self.nodes = nodes
|
|
20715
20728
|
* return self # <<<<<<<<<<<<<<
|
|
@@ -20721,7 +20734,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20721
20734
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
20722
20735
|
goto __pyx_L0;
|
|
20723
20736
|
|
|
20724
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20737
|
+
/* "selectolax/lexbor/selection.pxi":135
|
|
20725
20738
|
* return False
|
|
20726
20739
|
*
|
|
20727
20740
|
* def attribute_longer_than(self, str attribute, int length, str start = None): # <<<<<<<<<<<<<<
|
|
@@ -20746,7 +20759,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_8attribute_longe
|
|
|
20746
20759
|
return __pyx_r;
|
|
20747
20760
|
}
|
|
20748
20761
|
|
|
20749
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20762
|
+
/* "selectolax/lexbor/selection.pxi":150
|
|
20750
20763
|
* return self
|
|
20751
20764
|
*
|
|
20752
20765
|
* def any_attribute_longer_than(self, str attribute, int length, str start = None): # <<<<<<<<<<<<<<
|
|
@@ -20793,7 +20806,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_11any_attribute_
|
|
|
20793
20806
|
case 1:
|
|
20794
20807
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--;
|
|
20795
20808
|
else {
|
|
20796
|
-
__Pyx_RaiseArgtupleInvalid("any_attribute_longer_than", 0, 2, 3, 1); __PYX_ERR(5,
|
|
20809
|
+
__Pyx_RaiseArgtupleInvalid("any_attribute_longer_than", 0, 2, 3, 1); __PYX_ERR(5, 150, __pyx_L3_error)
|
|
20797
20810
|
}
|
|
20798
20811
|
CYTHON_FALLTHROUGH;
|
|
20799
20812
|
case 2:
|
|
@@ -20803,7 +20816,7 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_11any_attribute_
|
|
|
20803
20816
|
}
|
|
20804
20817
|
}
|
|
20805
20818
|
if (unlikely(kw_args > 0)) {
|
|
20806
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "any_attribute_longer_than") < 0)) __PYX_ERR(5,
|
|
20819
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "any_attribute_longer_than") < 0)) __PYX_ERR(5, 150, __pyx_L3_error)
|
|
20807
20820
|
}
|
|
20808
20821
|
} else {
|
|
20809
20822
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
@@ -20816,19 +20829,19 @@ static PyObject *__pyx_pw_10selectolax_6lexbor_14LexborSelector_11any_attribute_
|
|
|
20816
20829
|
}
|
|
20817
20830
|
}
|
|
20818
20831
|
__pyx_v_attribute = ((PyObject*)values[0]);
|
|
20819
|
-
__pyx_v_length = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(5,
|
|
20832
|
+
__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)
|
|
20820
20833
|
__pyx_v_start = ((PyObject*)values[2]);
|
|
20821
20834
|
}
|
|
20822
20835
|
goto __pyx_L4_argument_unpacking_done;
|
|
20823
20836
|
__pyx_L5_argtuple_error:;
|
|
20824
|
-
__Pyx_RaiseArgtupleInvalid("any_attribute_longer_than", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5,
|
|
20837
|
+
__Pyx_RaiseArgtupleInvalid("any_attribute_longer_than", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 150, __pyx_L3_error)
|
|
20825
20838
|
__pyx_L3_error:;
|
|
20826
20839
|
__Pyx_AddTraceback("selectolax.lexbor.LexborSelector.any_attribute_longer_than", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
20827
20840
|
__Pyx_RefNannyFinishContext();
|
|
20828
20841
|
return NULL;
|
|
20829
20842
|
__pyx_L4_argument_unpacking_done:;
|
|
20830
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute), (&PyUnicode_Type), 1, "attribute", 1))) __PYX_ERR(5,
|
|
20831
|
-
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), (&PyUnicode_Type), 1, "start", 1))) __PYX_ERR(5,
|
|
20843
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute), (&PyUnicode_Type), 1, "attribute", 1))) __PYX_ERR(5, 150, __pyx_L1_error)
|
|
20844
|
+
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), (&PyUnicode_Type), 1, "start", 1))) __PYX_ERR(5, 150, __pyx_L1_error)
|
|
20832
20845
|
__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);
|
|
20833
20846
|
|
|
20834
20847
|
/* function exit code */
|
|
@@ -20860,19 +20873,19 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
20860
20873
|
int __pyx_clineno = 0;
|
|
20861
20874
|
__Pyx_RefNannySetupContext("any_attribute_longer_than", 0);
|
|
20862
20875
|
|
|
20863
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20876
|
+
/* "selectolax/lexbor/selection.pxi":155
|
|
20864
20877
|
* Similar to `string-length` in XPath.
|
|
20865
20878
|
* """
|
|
20866
20879
|
* nodes = [] # <<<<<<<<<<<<<<
|
|
20867
20880
|
* for node in self.nodes:
|
|
20868
20881
|
* attr = node.attributes.get(attribute)
|
|
20869
20882
|
*/
|
|
20870
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
20883
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 155, __pyx_L1_error)
|
|
20871
20884
|
__Pyx_GOTREF(__pyx_t_1);
|
|
20872
20885
|
__pyx_v_nodes = ((PyObject*)__pyx_t_1);
|
|
20873
20886
|
__pyx_t_1 = 0;
|
|
20874
20887
|
|
|
20875
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20888
|
+
/* "selectolax/lexbor/selection.pxi":156
|
|
20876
20889
|
* """
|
|
20877
20890
|
* nodes = []
|
|
20878
20891
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -20881,30 +20894,30 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
20881
20894
|
*/
|
|
20882
20895
|
if (unlikely(__pyx_v_self->nodes == Py_None)) {
|
|
20883
20896
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
20884
|
-
__PYX_ERR(5,
|
|
20897
|
+
__PYX_ERR(5, 156, __pyx_L1_error)
|
|
20885
20898
|
}
|
|
20886
20899
|
__pyx_t_1 = __pyx_v_self->nodes; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
|
|
20887
20900
|
for (;;) {
|
|
20888
20901
|
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
|
|
20889
20902
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
20890
|
-
__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,
|
|
20903
|
+
__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)
|
|
20891
20904
|
#else
|
|
20892
|
-
__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20905
|
+
__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)
|
|
20893
20906
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20894
20907
|
#endif
|
|
20895
20908
|
__Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_3);
|
|
20896
20909
|
__pyx_t_3 = 0;
|
|
20897
20910
|
|
|
20898
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20911
|
+
/* "selectolax/lexbor/selection.pxi":157
|
|
20899
20912
|
* nodes = []
|
|
20900
20913
|
* for node in self.nodes:
|
|
20901
20914
|
* attr = node.attributes.get(attribute) # <<<<<<<<<<<<<<
|
|
20902
20915
|
* if attr and start and start in attr:
|
|
20903
20916
|
* attr = attr[attr.find(start) + len(start):]
|
|
20904
20917
|
*/
|
|
20905
|
-
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_attributes_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
20918
|
+
__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)
|
|
20906
20919
|
__Pyx_GOTREF(__pyx_t_4);
|
|
20907
|
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20920
|
+
__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)
|
|
20908
20921
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20909
20922
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20910
20923
|
__pyx_t_4 = NULL;
|
|
@@ -20919,20 +20932,20 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
20919
20932
|
}
|
|
20920
20933
|
__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);
|
|
20921
20934
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20922
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20935
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 157, __pyx_L1_error)
|
|
20923
20936
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20924
20937
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
20925
20938
|
__Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_3);
|
|
20926
20939
|
__pyx_t_3 = 0;
|
|
20927
20940
|
|
|
20928
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20941
|
+
/* "selectolax/lexbor/selection.pxi":158
|
|
20929
20942
|
* for node in self.nodes:
|
|
20930
20943
|
* attr = node.attributes.get(attribute)
|
|
20931
20944
|
* if attr and start and start in attr: # <<<<<<<<<<<<<<
|
|
20932
20945
|
* attr = attr[attr.find(start) + len(start):]
|
|
20933
20946
|
* if len(attr) > length:
|
|
20934
20947
|
*/
|
|
20935
|
-
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_attr); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20948
|
+
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_attr); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5, 158, __pyx_L1_error)
|
|
20936
20949
|
if (__pyx_t_7) {
|
|
20937
20950
|
} else {
|
|
20938
20951
|
__pyx_t_6 = __pyx_t_7;
|
|
@@ -20944,20 +20957,20 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
20944
20957
|
__pyx_t_6 = __pyx_t_7;
|
|
20945
20958
|
goto __pyx_L6_bool_binop_done;
|
|
20946
20959
|
}
|
|
20947
|
-
__pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_start, __pyx_v_attr, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(5,
|
|
20960
|
+
__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)
|
|
20948
20961
|
__pyx_t_8 = (__pyx_t_7 != 0);
|
|
20949
20962
|
__pyx_t_6 = __pyx_t_8;
|
|
20950
20963
|
__pyx_L6_bool_binop_done:;
|
|
20951
20964
|
if (__pyx_t_6) {
|
|
20952
20965
|
|
|
20953
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
20966
|
+
/* "selectolax/lexbor/selection.pxi":159
|
|
20954
20967
|
* attr = node.attributes.get(attribute)
|
|
20955
20968
|
* if attr and start and start in attr:
|
|
20956
20969
|
* attr = attr[attr.find(start) + len(start):] # <<<<<<<<<<<<<<
|
|
20957
20970
|
* if len(attr) > length:
|
|
20958
20971
|
* return True
|
|
20959
20972
|
*/
|
|
20960
|
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20973
|
+
__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)
|
|
20961
20974
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20962
20975
|
__pyx_t_4 = NULL;
|
|
20963
20976
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
|
|
@@ -20971,27 +20984,27 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
20971
20984
|
}
|
|
20972
20985
|
__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);
|
|
20973
20986
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20974
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(5,
|
|
20987
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 159, __pyx_L1_error)
|
|
20975
20988
|
__Pyx_GOTREF(__pyx_t_3);
|
|
20976
20989
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
20977
20990
|
if (unlikely(__pyx_v_start == Py_None)) {
|
|
20978
20991
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
20979
|
-
__PYX_ERR(5,
|
|
20992
|
+
__PYX_ERR(5, 159, __pyx_L1_error)
|
|
20980
20993
|
}
|
|
20981
|
-
__pyx_t_9 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_start); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5,
|
|
20982
|
-
__pyx_t_5 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5,
|
|
20994
|
+
__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)
|
|
20995
|
+
__pyx_t_5 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 159, __pyx_L1_error)
|
|
20983
20996
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20984
|
-
__pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5,
|
|
20997
|
+
__pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 159, __pyx_L1_error)
|
|
20985
20998
|
__Pyx_GOTREF(__pyx_t_4);
|
|
20986
20999
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
20987
21000
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
20988
|
-
__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,
|
|
21001
|
+
__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)
|
|
20989
21002
|
__Pyx_GOTREF(__pyx_t_5);
|
|
20990
21003
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
20991
21004
|
__Pyx_DECREF_SET(__pyx_v_attr, __pyx_t_5);
|
|
20992
21005
|
__pyx_t_5 = 0;
|
|
20993
21006
|
|
|
20994
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21007
|
+
/* "selectolax/lexbor/selection.pxi":158
|
|
20995
21008
|
* for node in self.nodes:
|
|
20996
21009
|
* attr = node.attributes.get(attribute)
|
|
20997
21010
|
* if attr and start and start in attr: # <<<<<<<<<<<<<<
|
|
@@ -21000,18 +21013,18 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
21000
21013
|
*/
|
|
21001
21014
|
}
|
|
21002
21015
|
|
|
21003
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21016
|
+
/* "selectolax/lexbor/selection.pxi":160
|
|
21004
21017
|
* if attr and start and start in attr:
|
|
21005
21018
|
* attr = attr[attr.find(start) + len(start):]
|
|
21006
21019
|
* if len(attr) > length: # <<<<<<<<<<<<<<
|
|
21007
21020
|
* return True
|
|
21008
21021
|
* return False
|
|
21009
21022
|
*/
|
|
21010
|
-
__pyx_t_9 = PyObject_Length(__pyx_v_attr); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5,
|
|
21023
|
+
__pyx_t_9 = PyObject_Length(__pyx_v_attr); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(5, 160, __pyx_L1_error)
|
|
21011
21024
|
__pyx_t_6 = ((__pyx_t_9 > __pyx_v_length) != 0);
|
|
21012
21025
|
if (__pyx_t_6) {
|
|
21013
21026
|
|
|
21014
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21027
|
+
/* "selectolax/lexbor/selection.pxi":161
|
|
21015
21028
|
* attr = attr[attr.find(start) + len(start):]
|
|
21016
21029
|
* if len(attr) > length:
|
|
21017
21030
|
* return True # <<<<<<<<<<<<<<
|
|
@@ -21024,7 +21037,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
21024
21037
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21025
21038
|
goto __pyx_L0;
|
|
21026
21039
|
|
|
21027
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21040
|
+
/* "selectolax/lexbor/selection.pxi":160
|
|
21028
21041
|
* if attr and start and start in attr:
|
|
21029
21042
|
* attr = attr[attr.find(start) + len(start):]
|
|
21030
21043
|
* if len(attr) > length: # <<<<<<<<<<<<<<
|
|
@@ -21033,7 +21046,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
21033
21046
|
*/
|
|
21034
21047
|
}
|
|
21035
21048
|
|
|
21036
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21049
|
+
/* "selectolax/lexbor/selection.pxi":156
|
|
21037
21050
|
* """
|
|
21038
21051
|
* nodes = []
|
|
21039
21052
|
* for node in self.nodes: # <<<<<<<<<<<<<<
|
|
@@ -21043,7 +21056,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
21043
21056
|
}
|
|
21044
21057
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21045
21058
|
|
|
21046
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21059
|
+
/* "selectolax/lexbor/selection.pxi":162
|
|
21047
21060
|
* if len(attr) > length:
|
|
21048
21061
|
* return True
|
|
21049
21062
|
* return False # <<<<<<<<<<<<<<
|
|
@@ -21055,7 +21068,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
21055
21068
|
__pyx_r = Py_False;
|
|
21056
21069
|
goto __pyx_L0;
|
|
21057
21070
|
|
|
21058
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21071
|
+
/* "selectolax/lexbor/selection.pxi":150
|
|
21059
21072
|
* return self
|
|
21060
21073
|
*
|
|
21061
21074
|
* def any_attribute_longer_than(self, str attribute, int length, str start = None): # <<<<<<<<<<<<<<
|
|
@@ -21080,7 +21093,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_10any_attribute_
|
|
|
21080
21093
|
return __pyx_r;
|
|
21081
21094
|
}
|
|
21082
21095
|
|
|
21083
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21096
|
+
/* "selectolax/lexbor/selection.pxi":164
|
|
21084
21097
|
* return False
|
|
21085
21098
|
*
|
|
21086
21099
|
* def __bool__(self): # <<<<<<<<<<<<<<
|
|
@@ -21111,21 +21124,21 @@ static int __pyx_pf_10selectolax_6lexbor_14LexborSelector_12__bool__(struct __py
|
|
|
21111
21124
|
int __pyx_clineno = 0;
|
|
21112
21125
|
__Pyx_RefNannySetupContext("__bool__", 0);
|
|
21113
21126
|
|
|
21114
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21127
|
+
/* "selectolax/lexbor/selection.pxi":165
|
|
21115
21128
|
*
|
|
21116
21129
|
* def __bool__(self):
|
|
21117
21130
|
* return bool(self.nodes) # <<<<<<<<<<<<<<
|
|
21118
21131
|
*
|
|
21119
21132
|
*
|
|
21120
21133
|
*/
|
|
21121
|
-
__pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cpython_4bool_bool), __pyx_v_self->nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
21134
|
+
__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)
|
|
21122
21135
|
__Pyx_GOTREF(__pyx_t_1);
|
|
21123
|
-
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5,
|
|
21136
|
+
__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)
|
|
21124
21137
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21125
21138
|
__pyx_r = __pyx_t_2;
|
|
21126
21139
|
goto __pyx_L0;
|
|
21127
21140
|
|
|
21128
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21141
|
+
/* "selectolax/lexbor/selection.pxi":164
|
|
21129
21142
|
* return False
|
|
21130
21143
|
*
|
|
21131
21144
|
* def __bool__(self): # <<<<<<<<<<<<<<
|
|
@@ -21452,7 +21465,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_14LexborSelector_16__setstate_cyt
|
|
|
21452
21465
|
return __pyx_r;
|
|
21453
21466
|
}
|
|
21454
21467
|
|
|
21455
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21468
|
+
/* "selectolax/lexbor/selection.pxi":168
|
|
21456
21469
|
*
|
|
21457
21470
|
*
|
|
21458
21471
|
* cdef lxb_status_t css_finder_callback(lxb_dom_node_t *node, lxb_css_selector_specificity_t *spec, void *ctx): # <<<<<<<<<<<<<<
|
|
@@ -21473,7 +21486,7 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_finder_callback(lxb_dom_nod
|
|
|
21473
21486
|
int __pyx_clineno = 0;
|
|
21474
21487
|
__Pyx_RefNannySetupContext("css_finder_callback", 0);
|
|
21475
21488
|
|
|
21476
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21489
|
+
/* "selectolax/lexbor/selection.pxi":171
|
|
21477
21490
|
* cdef LexborNode lxb_node
|
|
21478
21491
|
* cdef object cls
|
|
21479
21492
|
* cls = <object> ctx # <<<<<<<<<<<<<<
|
|
@@ -21485,49 +21498,49 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_finder_callback(lxb_dom_nod
|
|
|
21485
21498
|
__pyx_v_cls = __pyx_t_1;
|
|
21486
21499
|
__pyx_t_1 = 0;
|
|
21487
21500
|
|
|
21488
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21501
|
+
/* "selectolax/lexbor/selection.pxi":172
|
|
21489
21502
|
* cdef object cls
|
|
21490
21503
|
* cls = <object> ctx
|
|
21491
21504
|
* lxb_node = LexborNode() # <<<<<<<<<<<<<<
|
|
21492
21505
|
* lxb_node._cinit(<lxb_dom_node_t *> node, cls.current_node.parser)
|
|
21493
21506
|
* cls.results.append(lxb_node)
|
|
21494
21507
|
*/
|
|
21495
|
-
__pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_10selectolax_6lexbor_LexborNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
21508
|
+
__pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_10selectolax_6lexbor_LexborNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 172, __pyx_L1_error)
|
|
21496
21509
|
__Pyx_GOTREF(__pyx_t_1);
|
|
21497
21510
|
__pyx_v_lxb_node = ((struct __pyx_obj_10selectolax_6lexbor_LexborNode *)__pyx_t_1);
|
|
21498
21511
|
__pyx_t_1 = 0;
|
|
21499
21512
|
|
|
21500
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21513
|
+
/* "selectolax/lexbor/selection.pxi":173
|
|
21501
21514
|
* cls = <object> ctx
|
|
21502
21515
|
* lxb_node = LexborNode()
|
|
21503
21516
|
* lxb_node._cinit(<lxb_dom_node_t *> node, cls.current_node.parser) # <<<<<<<<<<<<<<
|
|
21504
21517
|
* cls.results.append(lxb_node)
|
|
21505
21518
|
* return LXB_STATUS_OK
|
|
21506
21519
|
*/
|
|
21507
|
-
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_current_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
21520
|
+
__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)
|
|
21508
21521
|
__Pyx_GOTREF(__pyx_t_1);
|
|
21509
|
-
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(5,
|
|
21522
|
+
__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)
|
|
21510
21523
|
__Pyx_GOTREF(__pyx_t_2);
|
|
21511
21524
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21512
|
-
if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10selectolax_6lexbor_LexborHTMLParser))))) __PYX_ERR(5,
|
|
21513
|
-
__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,
|
|
21525
|
+
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)
|
|
21526
|
+
__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)
|
|
21514
21527
|
__Pyx_GOTREF(__pyx_t_1);
|
|
21515
21528
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
21516
21529
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21517
21530
|
|
|
21518
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21531
|
+
/* "selectolax/lexbor/selection.pxi":174
|
|
21519
21532
|
* lxb_node = LexborNode()
|
|
21520
21533
|
* lxb_node._cinit(<lxb_dom_node_t *> node, cls.current_node.parser)
|
|
21521
21534
|
* cls.results.append(lxb_node) # <<<<<<<<<<<<<<
|
|
21522
21535
|
* return LXB_STATUS_OK
|
|
21523
21536
|
*
|
|
21524
21537
|
*/
|
|
21525
|
-
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
21538
|
+
__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)
|
|
21526
21539
|
__Pyx_GOTREF(__pyx_t_1);
|
|
21527
|
-
__pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_1, ((PyObject *)__pyx_v_lxb_node)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5,
|
|
21540
|
+
__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)
|
|
21528
21541
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21529
21542
|
|
|
21530
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21543
|
+
/* "selectolax/lexbor/selection.pxi":175
|
|
21531
21544
|
* lxb_node._cinit(<lxb_dom_node_t *> node, cls.current_node.parser)
|
|
21532
21545
|
* cls.results.append(lxb_node)
|
|
21533
21546
|
* return LXB_STATUS_OK # <<<<<<<<<<<<<<
|
|
@@ -21537,7 +21550,7 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_finder_callback(lxb_dom_nod
|
|
|
21537
21550
|
__pyx_r = LXB_STATUS_OK;
|
|
21538
21551
|
goto __pyx_L0;
|
|
21539
21552
|
|
|
21540
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21553
|
+
/* "selectolax/lexbor/selection.pxi":168
|
|
21541
21554
|
*
|
|
21542
21555
|
*
|
|
21543
21556
|
* cdef lxb_status_t css_finder_callback(lxb_dom_node_t *node, lxb_css_selector_specificity_t *spec, void *ctx): # <<<<<<<<<<<<<<
|
|
@@ -21558,7 +21571,7 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_finder_callback(lxb_dom_nod
|
|
|
21558
21571
|
return __pyx_r;
|
|
21559
21572
|
}
|
|
21560
21573
|
|
|
21561
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21574
|
+
/* "selectolax/lexbor/selection.pxi":177
|
|
21562
21575
|
* return LXB_STATUS_OK
|
|
21563
21576
|
*
|
|
21564
21577
|
* cdef lxb_status_t css_matcher_callback(lxb_dom_node_t *node, lxb_css_selector_specificity_t *spec, void *ctx): # <<<<<<<<<<<<<<
|
|
@@ -21577,7 +21590,7 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_matcher_callback(CYTHON_UNU
|
|
|
21577
21590
|
int __pyx_clineno = 0;
|
|
21578
21591
|
__Pyx_RefNannySetupContext("css_matcher_callback", 0);
|
|
21579
21592
|
|
|
21580
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21593
|
+
/* "selectolax/lexbor/selection.pxi":180
|
|
21581
21594
|
* cdef LexborNode lxb_node
|
|
21582
21595
|
* cdef object cls
|
|
21583
21596
|
* cls = <object> ctx # <<<<<<<<<<<<<<
|
|
@@ -21589,18 +21602,18 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_matcher_callback(CYTHON_UNU
|
|
|
21589
21602
|
__pyx_v_cls = __pyx_t_1;
|
|
21590
21603
|
__pyx_t_1 = 0;
|
|
21591
21604
|
|
|
21592
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21605
|
+
/* "selectolax/lexbor/selection.pxi":181
|
|
21593
21606
|
* cdef object cls
|
|
21594
21607
|
* cls = <object> ctx
|
|
21595
21608
|
* cls.results.append(True) # <<<<<<<<<<<<<<
|
|
21596
21609
|
* return LXB_STATUS_STOP
|
|
21597
21610
|
*/
|
|
21598
|
-
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(5,
|
|
21611
|
+
__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)
|
|
21599
21612
|
__Pyx_GOTREF(__pyx_t_1);
|
|
21600
|
-
__pyx_t_2 = __Pyx_PyObject_Append(__pyx_t_1, Py_True); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5,
|
|
21613
|
+
__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)
|
|
21601
21614
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
21602
21615
|
|
|
21603
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21616
|
+
/* "selectolax/lexbor/selection.pxi":182
|
|
21604
21617
|
* cls = <object> ctx
|
|
21605
21618
|
* cls.results.append(True)
|
|
21606
21619
|
* return LXB_STATUS_STOP # <<<<<<<<<<<<<<
|
|
@@ -21608,7 +21621,7 @@ static lxb_status_t __pyx_f_10selectolax_6lexbor_css_matcher_callback(CYTHON_UNU
|
|
|
21608
21621
|
__pyx_r = LXB_STATUS_STOP;
|
|
21609
21622
|
goto __pyx_L0;
|
|
21610
21623
|
|
|
21611
|
-
/* "selectolax/lexbor/selection.pxi":
|
|
21624
|
+
/* "selectolax/lexbor/selection.pxi":177
|
|
21612
21625
|
* return LXB_STATUS_OK
|
|
21613
21626
|
*
|
|
21614
21627
|
* cdef lxb_status_t css_matcher_callback(lxb_dom_node_t *node, lxb_css_selector_specificity_t *spec, void *ctx): # <<<<<<<<<<<<<<
|
|
@@ -23941,7 +23954,7 @@ static PyObject *__pyx_pf_10selectolax_6lexbor_16LexborHTMLParser_14strip_tags(s
|
|
|
23941
23954
|
|
|
23942
23955
|
/* Python wrapper */
|
|
23943
23956
|
static PyObject *__pyx_pw_10selectolax_6lexbor_16LexborHTMLParser_17select(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
23944
|
-
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
|
|
23957
|
+
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 ";
|
|
23945
23958
|
static PyObject *__pyx_pw_10selectolax_6lexbor_16LexborHTMLParser_17select(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
23946
23959
|
PyObject *__pyx_v_query = 0;
|
|
23947
23960
|
int __pyx_lineno = 0;
|
|
@@ -28379,16 +28392,16 @@ static int __Pyx_modinit_type_init_code(void) {
|
|
|
28379
28392
|
__pyx_ptype_10selectolax_6lexbor_TextContainer = &__pyx_type_10selectolax_6lexbor_TextContainer;
|
|
28380
28393
|
__pyx_vtabptr_10selectolax_6lexbor_LexborSelector = &__pyx_vtable_10selectolax_6lexbor_LexborSelector;
|
|
28381
28394
|
__pyx_vtable_10selectolax_6lexbor_LexborSelector.css = (PyObject *(*)(struct __pyx_obj_10selectolax_6lexbor_LexborSelector *, PyObject *, int __pyx_skip_dispatch))__pyx_f_10selectolax_6lexbor_14LexborSelector_css;
|
|
28382
|
-
if (PyType_Ready(&__pyx_type_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5,
|
|
28395
|
+
if (PyType_Ready(&__pyx_type_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5, 87, __pyx_L1_error)
|
|
28383
28396
|
#if PY_VERSION_HEX < 0x030800B1
|
|
28384
28397
|
__pyx_type_10selectolax_6lexbor_LexborSelector.tp_print = 0;
|
|
28385
28398
|
#endif
|
|
28386
28399
|
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)) {
|
|
28387
28400
|
__pyx_type_10selectolax_6lexbor_LexborSelector.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
28388
28401
|
}
|
|
28389
|
-
if (__Pyx_SetVtable(__pyx_type_10selectolax_6lexbor_LexborSelector.tp_dict, __pyx_vtabptr_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5,
|
|
28390
|
-
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LexborSelector, (PyObject *)&__pyx_type_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5,
|
|
28391
|
-
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5,
|
|
28402
|
+
if (__Pyx_SetVtable(__pyx_type_10selectolax_6lexbor_LexborSelector.tp_dict, __pyx_vtabptr_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5, 87, __pyx_L1_error)
|
|
28403
|
+
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LexborSelector, (PyObject *)&__pyx_type_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5, 87, __pyx_L1_error)
|
|
28404
|
+
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_10selectolax_6lexbor_LexborSelector) < 0) __PYX_ERR(5, 87, __pyx_L1_error)
|
|
28392
28405
|
__pyx_ptype_10selectolax_6lexbor_LexborSelector = &__pyx_type_10selectolax_6lexbor_LexborSelector;
|
|
28393
28406
|
if (PyType_Ready(&__pyx_type_10selectolax_6lexbor___pyx_scope_struct____iter__) < 0) __PYX_ERR(1, 15, __pyx_L1_error)
|
|
28394
28407
|
#if PY_VERSION_HEX < 0x030800B1
|