The CSS selector code in 4.1.3 can select the same tag multiple times if it's accessible through multiple paths. This will be fixed in 4.2.0.
site: http://www.russ.ru/Mirovaya-povestka/V-ozhidanii-novogo-duchebut it does not matter
i use soup.select(my_selector)
in this site 2 h1's tags
if i select by css:
h1
then
[<h1>В ожидании нового дуче</h1>, <h1 class="column-d-head">Лучшие публикации</h1>]
there are 2 elements and this is ok
if i select by
div.class-article h1
then
[<h1>В ожидании нового дуче</h1>]
there is 1 element and this is what i need
but when css is
div.float-break div.overflow-fix div.content-view-full div.class-article h1
then
[<h1>В ожидании нового дуче</h1>, <h1>В ожидании нового дуче</h1>]
WHAT A #$@!!!!!!!
is this ok?
when css
div div.float-break div.overflow-fix div.content-view-full div.class-article h1
then
[<h1>В ожидании нового дуче</h1>, <h1>В ожидании нового дуче</h1>, <h1>В ожидании нового дуче</h1>, <h1>В ожидании нового дуче</h1>]
4 elements.
Please explain me why?
Sorry for my bad English.