fact = random.choice(html.find_all('h2', class_='entry-title'))
MySQLite is an easy way to add MySQL functions to SQLite accessed through PDO.
Подскажите пожалуйста как можно решить проблему.
/usr/local/
). $ python3
Python 3.10.2 (main, Mar 8 2022, 23:56:15) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> '123'.isdigit()
True
>>> '123+'.isdigit()
False
>>> '123a'.isdigit()
False
Хочу по приколу сделать бота в телеграмме
Я в питоне очень плохо понимаю
title = post.find("a", class_="post__title_link").text.strip()
post__title_link
, то post.find("a", class_="post__title_link")
принимает значение None
. Отсюда ошибка AttributeError: 'NoneType' object has no attribute 'text'
. MariaDB [(none)]> SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';
+--------------------------+------------------------+
| Variable_name | Value |
+--------------------------+------------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| collation_connection | utf8mb4_unicode_520_ci |
| collation_database | utf8mb4_unicode_520_ci |
| collation_server | utf8mb4_unicode_520_ci |
+--------------------------+------------------------+
10 rows in set (0.021 sec)