Могу ли я использовать pwrtelegram + aiogram? - PullRequest
0 голосов
/ 17 июня 2020

Ищу способ рассылки файлов ботом до 1,5гб. Я нашел PwrTelegram, но когда я пытаюсь установить его, изменив api.py в aiogramm, он выдает ошибку. Есть мысли, как это можно сделать? Также был бы благодарен знать, есть ли другой способ без pwrtelegram?

aiogram_package_dir / bot / api.py, строка 17: API_URL = "https://api.pwrtelegram.xyz/bot{token}/{method}"

Ошибка:

    Traceback (most recent call last):
      File ".\main.py", line 935, in <module>
        executor.start_polling(dp, loop=loop)
      File "C:\Users\depozzyx\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\utils\executor.py", line 41, in start_polling
        executor.start_polling(reset_webhook=reset_webhook, timeout=timeout, relax=relax, fast=fast)
      File "C:\Users\depozzyx\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\utils\executor.py", line 305, in start_polling
        loop.run_until_complete(self._startup_polling())
      File "C:\Users\depozzyx\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 616, in run_until_complete
        return future.result()
      File "C:\Users\depozzyx\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\utils\executor.py", line 356, in _startup_polling
        await self._welcome()
      File "C:\Users\depozzyx\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\utils\executor.py", line 346, in _welcome
        user = await self.dispatcher.bot.me
      File "C:\Users\depozzyx\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\bot\bot.py", line 27, in me
        setattr(self, '_me', await self.get_me())
      File "C:\Users\depozzyx\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\bot\bot.py", line 176, in get_me
        result = await self.request(api.Methods.GET_ME, payload)
      File "C:\Users\depozzyx\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\bot\base.py", line 201, in request
        return await api.make_request(self.session, self.__token, method, data, files,
      File "C:\Users\depozzyx\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\bot\api.py", line 105, in make_request
        return check_result(method, response.content_type, response.status, await response.text())
      File "C:\Users\depozzyx\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\bot\api.py", line 62, in check_result
        raise exceptions.NetworkError(f"Invalid response with content type {content_type}: \"{body}\"")
    aiogram.utils.exceptions.NetworkError: Invalid response with content type text/html:
...