Answer the question
In order to leave comments, you need to log in
How to teach the bot to hide the link in the text and send it to the client?
Hello everyone, the bottom line is that you need to hide the links in the text ... since the parsed links turn out to be too large for output (they take up almost the entire screen). How can be implemented?
def get_Data(text):
response = requests.get(HOST + 'site/ru')
soup = BeautifulSoup(response.text,'lxml')
try:
text = soup.find('div', class_='main_left').find('tr').text.strip()
return text
except:
return 'Ошибка! '
if message.text == 'anon':
bot.send_message(message.chat.id,get_Data(message.text))
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