Как исправить ошибку с аргументами в python?
class KijijiClient:
def __init__(self, chat_id):
self.chat_id = chat_id
self.session = requests.session()
self.session.headers.update({
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
})
@bot.callback_query_handler(func=lambda call: call.data == 'parse_kijiji')
def handle_kijiji_parsing(call):
chat_id = call.message.chat.id
kijiji = KijijiClient(chat_id)
if kijiji.create_session():
if kijiji.authirize("email", "password"):
bot.send_message(chat_id, "Authorized successfully. Starting to parse...")
kijiji.parse_page("https://www.kijiji.ca/b-buy-sell/canada/c10l0")
bot.send_message(chat_id, "Parsing completed. Check the results.")
else:
bot.send_message(chat_id, "Authorization failed. Check credentials or site access.")
else:
bot.send_message(chat_id, "Failed to create a session. Check network and site availability.")
Вот такая ошибка: Ошибка при обработке запроса:
KijijiClient.__init__() takes 1 positional argument but 2 were given