Ну короч проксирование хотяб бы добавил С проксями cookies = { 'xf_user': 'F12', 'xf_tfa_trust': 'Приложение', 'xf_session': 'Файлы cookie', 'lolz.live_xf_tc_lmad': 'https://lolz.live' } proxies = { 'http': 'http://login:pass@ip:port ', 'https': 'http:/login:pass@ip:port', } headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36', } tg_bot_token = '123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' tg_chat_id = 987654321 # Без кавычек hours = '16,19,21' # Больше ничего редактировать не нужно from requests import Session from bs4 import BeautifulSoup from Crypto.Cipher import AES from re import compile, MULTILINE from datetime import datetime, timezone from collections import Counter from apscheduler.schedulers.asyncio import AsyncIOScheduler from aiogram import Bot, Dispatcher, types from aiogram.filters import Command from asyncio import get_event_loop, run s = Session() s.headers.update(headers) s.cookies.update(cookies) s.proxies.update(proxies) # Adding the proxies scheduler = AsyncIOScheduler(timezone="Europe/Moscow", job_defaults={'misfire_grace_time': None}) bot = Bot(token=tg_bot_token) dp = Dispatcher() @dp.message(Command('start')) async def start(message: types.Message): if not message.from_user.id == tg_chat_id: return await message.answer(':)', reply_markup=types.ReplyKeyboardMarkup(keyboard=[[types.KeyboardButton(text='Проверить сейчас')]], resize_keyboard=True)) @dp.message(lambda message: message.text == 'Проверить сейчас') async def check_now(message: types.Message): if not message.from_user.id == tg_chat_id: return await bot.send_chat_action(message.chat.id, action="typing") await trophy_notifier() async def trophy_notifier(): today = datetime.now(timezone.utc).date() # Устанавливаем куки dfuid (или как его там) soup = BeautifulSoup(s.get('https://lolz.live').text, 'html.parser') if soup.find("noscript") and soup.find("noscript").text == 'Oops! Please enable JavaScript and Cookies in your browser.': match = compile(r'document\.cookie\s*=\s*"([^="]+)="\s*\+\s*toHex\(slowAES\.decrypt\(toNumbers\(\"([0-9a-f]{32})\"\)', MULTILINE).search(soup.find_all('script')[1].string) value = AES.new(bytearray.fromhex("e9df592a0909bfa5fcff1ce7958e598b"), AES.MODE_CBC, bytearray.fromhex("5d10aa76f4aed1bdf3dbb302e8863d52")).decrypt(bytearray.fromhex(match.group(2))).hex() s.cookies.set(name=match.group(1), value=value) s.get('https://lolz.live') # Нет, это не ошибка. Почему-то нужно делать два запроса, чтобы всё работало. soup = BeautifulSoup(s.get('https://lolz.live/account/personal-details').text, 'html.parser') profile = soup.find_all('p', class_='explain')[2].find('a')['href'] notification = 'Активный 90: ' try: notification += BeautifulSoup(s.get(profile + 'trophies').text, 'html.parser').find(id='trophy-132').find('div', class_='count').text + '/90' except: notification += 'СЕГОДНЯ НЕ ВЫПОЛНЕН' posts = BeautifulSoup(s.get(f'https://lolz.live/search/search?users={soup.find(id="ctrl_username")["value"]}&content=post').text, 'html.parser').find_all('li', class_='searchResult post primaryContent') posts = list(filter(lambda post: post.find('abbr', class_="DateTime") and datetime.fromtimestamp(int(post.find('abbr', class_="DateTime")['data-time']), tz=timezone.utc).date() == today, posts)) notification += '\n\nСообщений: ' + (str(len(posts)) if len(posts) < 20 else '> 20') likes = BeautifulSoup(s.get(profile + 'likes').text, 'html.parser').find('div', class_='likesList').find_all('div', class_='likeContainer') + BeautifulSoup(s.get(profile + 'likes?content_type=post_comment').text, 'html.parser').find('div', class_='likesList').find_all('div', class_='likeContainer') likes = list(filter(lambda like: like.find('abbr', class_="DateTime") and datetime.fromtimestamp(int(like.find('abbr', class_="DateTime")['data-time']), tz=timezone.utc).date() == today, likes)) notification += '\n\nСимпатий: ' + (str(len(likes)) if len(likes) < 20 else '> 20') forums = [like.find_all('a')[4].text for like in likes] notification += '\n' + '\n'.join([f'{section}: {count}' for section, count in Counter(forums).items()]) await bot.send_message(tg_chat_id, notification) async def main(): scheduler = AsyncIOScheduler(timezone="Europe/Moscow", job_defaults={'misfire_grace_time': None}) scheduler.add_job(trophy_notifier, 'cron', hour='16,18,16,20', minute='0') scheduler.start() try: await dp.start_polling(bot) finally: await bot.session.close() scheduler.shutdown() run(main()) Python cookies = { 'xf_user': 'F12', 'xf_tfa_trust': 'Приложение', 'xf_session': 'Файлы cookie', 'lolz.live_xf_tc_lmad': 'https://lolz.live' } proxies = { 'http': 'http://login:pass@ip:port ', 'https': 'http:/login:pass@ip:port', } headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36', } tg_bot_token = '123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' tg_chat_id = 987654321 # Без кавычек hours = '16,19,21' # Больше ничего редактировать не нужно from requests import Session from bs4 import BeautifulSoup from Crypto.Cipher import AES from re import compile, MULTILINE from datetime import datetime, timezone from collections import Counter from apscheduler.schedulers.asyncio import AsyncIOScheduler from aiogram import Bot, Dispatcher, types from aiogram.filters import Command from asyncio import get_event_loop, run s = Session() s.headers.update(headers) s.cookies.update(cookies) s.proxies.update(proxies) # Adding the proxies scheduler = AsyncIOScheduler(timezone="Europe/Moscow", job_defaults={'misfire_grace_time': None}) bot = Bot(token=tg_bot_token) dp = Dispatcher() @dp.message(Command('start')) async def start(message: types.Message): if not message.from_user.id == tg_chat_id: return await message.answer(':)', reply_markup=types.ReplyKeyboardMarkup(keyboard=[[types.KeyboardButton(text='Проверить сейчас')]], resize_keyboard=True)) @dp.message(lambda message: message.text == 'Проверить сейчас') async def check_now(message: types.Message): if not message.from_user.id == tg_chat_id: return await bot.send_chat_action(message.chat.id, action="typing") await trophy_notifier() async def trophy_notifier(): today = datetime.now(timezone.utc).date() # Устанавливаем куки dfuid (или как его там) soup = BeautifulSoup(s.get('https://lolz.live').text, 'html.parser') if soup.find("noscript") and soup.find("noscript").text == 'Oops! Please enable JavaScript and Cookies in your browser.': match = compile(r'document\.cookie\s*=\s*"([^="]+)="\s*\+\s*toHex\(slowAES\.decrypt\(toNumbers\(\"([0-9a-f]{32})\"\)', MULTILINE).search(soup.find_all('script')[1].string) value = AES.new(bytearray.fromhex("e9df592a0909bfa5fcff1ce7958e598b"), AES.MODE_CBC, bytearray.fromhex("5d10aa76f4aed1bdf3dbb302e8863d52")).decrypt(bytearray.fromhex(match.group(2))).hex() s.cookies.set(name=match.group(1), value=value) s.get('https://lolz.live') # Нет, это не ошибка. Почему-то нужно делать два запроса, чтобы всё работало. soup = BeautifulSoup(s.get('https://lolz.live/account/personal-details').text, 'html.parser') profile = soup.find_all('p', class_='explain')[2].find('a')['href'] notification = 'Активный 90: ' try: notification += BeautifulSoup(s.get(profile + 'trophies').text, 'html.parser').find(id='trophy-132').find('div', class_='count').text + '/90' except: notification += 'СЕГОДНЯ НЕ ВЫПОЛНЕН' posts = BeautifulSoup(s.get(f'https://lolz.live/search/search?users={soup.find(id="ctrl_username")["value"]}&content=post').text, 'html.parser').find_all('li', class_='searchResult post primaryContent') posts = list(filter(lambda post: post.find('abbr', class_="DateTime") and datetime.fromtimestamp(int(post.find('abbr', class_="DateTime")['data-time']), tz=timezone.utc).date() == today, posts)) notification += '\n\nСообщений: ' + (str(len(posts)) if len(posts) < 20 else '> 20') likes = BeautifulSoup(s.get(profile + 'likes').text, 'html.parser').find('div', class_='likesList').find_all('div', class_='likeContainer') + BeautifulSoup(s.get(profile + 'likes?content_type=post_comment').text, 'html.parser').find('div', class_='likesList').find_all('div', class_='likeContainer') likes = list(filter(lambda like: like.find('abbr', class_="DateTime") and datetime.fromtimestamp(int(like.find('abbr', class_="DateTime")['data-time']), tz=timezone.utc).date() == today, likes)) notification += '\n\nСимпатий: ' + (str(len(likes)) if len(likes) < 20 else '> 20') forums = [like.find_all('a')[4].text for like in likes] notification += '\n' + '\n'.join([f'{section}: {count}' for section, count in Counter(forums).items()]) await bot.send_message(tg_chat_id, notification) async def main(): scheduler = AsyncIOScheduler(timezone="Europe/Moscow", job_defaults={'misfire_grace_time': None}) scheduler.add_job(trophy_notifier, 'cron', hour='16,18,16,20', minute='0') scheduler.start() try: await dp.start_polling(bot) finally: await bot.session.close() scheduler.shutdown() run(main()) Хотел на httpx но он чет выебывается
ребят ловите лайфхак, просто создавайте розыгрыши каждый день на протяжении 90 дней и трофей ваш p.s. то же самое можно провернуть и с 'активный 365'
што делать? версия питона последняя pip install pycryptodome и pip install pycryptodomex установил - не помогло.