selectolax 0.3.17__cp312-cp312-win32.whl → 0.3.18__cp312-cp312-win32.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of selectolax might be problematic. Click here for more details.

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