Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telegram-download does not work on private groups/channels #245

Open
ghost opened this issue Dec 31, 2023 · 2 comments
Open

telegram-download does not work on private groups/channels #245

ghost opened this issue Dec 31, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 31, 2023

  • telegram-upload version: telegram_upload-0.7.1
  • Python version: 3.11
  • Operating System: Windows 10
  • Dependencies list (run pip freeze):
    aiofiles==0.8.0
    aiohttp==3.9.1
    aiolimiter==1.1.0
    aiorun==2023.7.2
    aiosignal==1.3.1
    aiosqlite==0.17.0
    anyio==4.0.0
    appdirs==1.4.4
    async-timeout==4.0.2
    asyncpraw==7.7.1
    asyncprawcore==2.3.0
    attrs==23.1.0
    auditok==0.1.5
    babelfish==0.6.0
    beautifulsoup4==4.12.2
    blinker==1.7.0
    Brotli==1.1.0
    browser-cookie3==0.19.1
    certifi==2023.11.17
    cffi==1.16.0
    chardet==5.1.0
    charset-normalizer==3.2.0
    click==8.1.6
    colorama==0.4.6
    comtypes==1.2.0
    cryptg==0.4.0
    cssselect==1.2.0
    cyberdrop-dl==5.1.27
    decorator==5.1.1
    dogpile.cache==1.2.2
    enzyme==0.4.1
    faust-cchardet==2.1.18
    ffmpeg-python==0.2.0
    ffsubsync==0.4.25
    filedate==2.0
    Flask==3.0.0
    Flask-Cors==4.0.0
    frozenlist==1.4.0
    future==0.18.3
    gallery-dl==1.26.5
    get-video-properties==0.1.1
    greenlet==2.0.2
    guessit==3.7.1
    h11==0.14.0
    hachoir==3.3.0
    httpcore==0.18.0
    httpx==0.25.0
    idna==3.4
    iniconfig==2.0.0
    inquirerpy==0.3.4
    itsdangerous==2.1.2
    Jinja2==3.1.2
    keyboard==0.13.5
    lxml==4.9.3
    lz4==4.3.2
    markdown-it-py==3.0.0
    MarkupSafe==2.1.3
    mdurl==0.1.2
    mediafire==0.6.1
    more-itertools==10.1.0
    multidict==6.0.4
    mutagen==1.47.0
    myjdapi==1.1.7
    numpy==1.25.1
    outcome==1.2.0
    packaging==23.1
    pbr==5.11.1
    pfzy==0.3.4
    Pillow==10.1.0
    platformdirs==3.11.0
    playwright==1.37.0
    pluggy==1.3.0
    prompt-toolkit==3.0.41
    pyaes==1.6.1
    pyasn1==0.5.1
    pycparser==2.21
    pycryptodome==3.18.0
    pycryptodomex==3.19.0
    pyee==9.0.4
    Pygments==2.15.1
    PySocks==1.7.1
    pysrt==1.1.2
    pysubs2==1.6.1
    pytesseract==0.3.10
    python-dateutil==2.8.2
    python-dotenv==1.0.0
    python-telegram-bot==20.6
    pytz==2023.3
    pywifi==1.1.12
    PyYAML==6.0.1
    rarfile==4.0
    rebulk==3.2.0
    requests==2.31.0
    requests-toolbelt==1.0.0
    rich==13.7.0
    rsa==4.9
    selenium==4.13.0
    six==1.16.0
    sniffio==1.3.0
    sortedcontainers==2.4.0
    soupsieve==2.4.1
    srt==3.5.3
    stevedore==5.1.0
    subliminal==2.1.0
    telegram-upload==0.7.1
    Telethon==1.33.1
    TikTokApi==6.1.1
    tqdm==4.66.1
    trio==0.22.2
    trio-websocket==0.11.1
    typing_extensions==4.7.1
    update-checker==0.18.0
    urllib3==2.0.4
    wcwidth==0.2.12
    webdriver-manager==4.0.1
    webrtcvad-wheels==2.0.11.post1
    websockets==12.0
    Werkzeug==3.0.1
    wsproto==1.2.0
    yarl==1.9.2

Description

I am trying to download from private telegram group/channel but it gives an error. Public chats are fine though.

What I Did

command:

telegram-download -f 1796923091

traceback:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\user\AppData\Roaming\Python\Python311\Scripts\telegram-download.exe\__main__.py", line 7, in <module>
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\telegram_upload\exceptions.py", line 68, in wrap
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\telegram_upload\management.py", line 230, in download
    download_files = messages_cls(reversed(list(messages)))
                                           ^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\telegram_upload\client\telegram_download_client.py", line 30, in find_files
    for message in self.iter_messages(entity):
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\telethon\requestiter.py", line 87, in __next__
    return self.client.loop.run_until_complete(self.__anext__())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\telethon\requestiter.py", line 58, in __anext__
    if await self._init(**self.kwargs):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\telethon\client\messages.py", line 27, in _init
    self.entity = await self.client.get_input_entity(entity)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\telethon\client\users.py", line 468, in get_input_entity
    raise ValueError(
ValueError: Could not find the input entity for PeerUser(user_id=1796923091) (PeerUser). Please read https://docs.telethon.dev/en/stable/concepts/entities.html to find out more details.
@Nideapum
Copy link

I can download from URL using this
#159 (comment)

@Nideapum
Copy link

Me funciona bien en un equipo que no he actualizado nunca.
Y en otro me salta este error si uso la opción (-f).

No da problema al usar el modo interactivo (-i).

He puesto la misma versión que tengo funcionando en el otro equipo, instalada usando pip, y no hay manera

telegram-upload==0.6.1
Telethon==1.24.0

También he copiado los directorios .../sites-packages/telethon y telegram-upload del equipo donde funciona y tampoco le gusta. Me aparece otro error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant