H
H
hey_umbrella2021-07-12 03:49:48
Python
hey_umbrella, 2021-07-12 03:49:48

Why doesn't it parse?

60eb9179ec298867502048.png

I need to get a link from q-item__link, but for some reason nothing is displayed, there are no errors.

for articlerbc in soup2.select('.q-item__link:has(a)'):
        check = articlerbc.text
        check2 = articlerbc.span.text
        print(check2)
        print(articlerbc.text)
        if check.find(name) != -1:
            bot.send_message(message.chat.id, articlerbc.a['href'] + f'  Связанная новость с {name}',reply_markup=key_user)
        elif check2.find(name) != -1:
            bot.send_message(message.chat.id, articlerbc.a['href'] + f' Связанная новость с {name}',reply_markup=key_user)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-07-12
@hey_umbrella

Why a pseudo class? Delete

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question