Answer the question
In order to leave comments, you need to log in
Why doesn't it parse?
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question