@@ -73,6 +73,8 @@ def __init__(self, golden_key: str, user_agent: str | None = None,
7373 """Время последнего возникновения 429 ошибки"""
7474 self .last_flood_err_time : float = 0
7575 """Время последнего возникновения ошибки \" Нельзя отправлять сообщения слишком часто.\" """
76+ self .last_multiuser_flood_err_time : float = 0
77+ """Время последнего возникновения ошибки \" Нельзя слишком часто отправлять сообщения разным пользователям.\" """
7678 self .__locale : Literal ["ru" , "en" , "uk" ] | None = None
7779 """Текущий язык аккаунта."""
7880 self .__default_locale : Literal ["ru" , "en" , "uk" ] | None = locale
@@ -720,6 +722,10 @@ def send_message(self, chat_id: int | str, text: Optional[str] = None, chat_name
720722 "You cannot send messages too frequently." ,
721723 "Не можна надсилати повідомлення занадто часто." ):
722724 self .last_flood_err_time = time .time ()
725+ elif error_text in ("Нельзя слишком часто отправлять сообщения разным пользователям." ,
726+ "Не можна надто часто надсилати повідомлення різним користувачам." ,
727+ "You cannot message multiple users too frequently." ):
728+ self .last_multiuser_flood_err_time = time .time ()
723729 raise exceptions .MessageNotDeliveredError (response , error_text , chat_id )
724730 if leave_as_unread :
725731 message_text = text
@@ -1394,9 +1400,11 @@ def get_sales(self, start_from: str | None = None, include_paid: bool = True, in
13941400 html_response = response .content .decode ()
13951401
13961402 parser = BeautifulSoup (html_response , "lxml" )
1397- check_user = parser .find ("div" , {"class" : "content-account content-account-login" })
1398- if check_user :
1399- raise exceptions .UnauthorizedError (response )
1403+
1404+ if not start_from :
1405+ username = parser .find ("div" , {"class" : "user-link-name" })
1406+ if not username :
1407+ raise exceptions .UnauthorizedError (response )
14001408
14011409 next_order_id = parser .find ("input" , {"type" : "hidden" , "name" : "continue" })
14021410 next_order_id = next_order_id .get ("value" ) if next_order_id else None
0 commit comments