Giter Site home page Giter Site logo

Comments (8)

fabianski7 avatar fabianski7 commented on June 11, 2024 1

Yes. That's what I'm using.

But my intention was to download only one specific format. Like only .pdf

Currently, if you use document in media_type, all formats will be downloaded

from telegram_media_downloader.

Dineshkarthik avatar Dineshkarthik commented on June 11, 2024

@fabianski7 hi did you try using only document as media_types.

api_hash: your_api_hash
api_id: your_api_id
chat_id: telegram_chat_id
last_read_message_id: 0
media_types:
- document

I hope this is what you are looking for.

from telegram_media_downloader.

Dineshkarthik avatar Dineshkarthik commented on June 11, 2024

@fabianski7 now you can download specific file formats. pull in the new changes from master branch and update the config as follows:

api_hash: your_api_hash
api_id: your_api_id
chat_id: telegram_chat_id
last_read_message_id: 0
media_types:
- document
file_formats:
  document:
  - pdf
  - epub

from telegram_media_downloader.

fabianski7 avatar fabianski7 commented on June 11, 2024

after several hours of capturing the messages (I think that's what was happening) I got this error

INFO:pyrogram.session.session:Send 8 acks
INFO:pyrogram.session.session:Send 8 acks
INFO:pyrogram.session.session:Send 8 acks
Traceback (most recent call last):
  File "media_downloader.py", line 202, in <module>
    updated_config = asyncio.get_event_loop().run_until_complete(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "media_downloader.py", line 186, in begin_import
    last_read_message_id = await process_messages(
  File "media_downloader.py", line 165, in process_messages
    message_ids = await asyncio.gather(
  File "media_downloader.py", line 119, in download_media
    file_ref, file_name, file_format = await _get_media_meta(
  File "media_downloader.py", line 67, in _get_media_meta
    file_name = os.path.join(THIS_DIR, _type, media_obj.file_name)
  File "/usr/lib/python3.8/posixpath.py", line 90, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/lib/python3.8/genericpath.py", line 152, in _check_arg_types
    raise TypeError(f'{funcname}() argument must be str, bytes, or '
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'

No files have been downloaded.

Well, it's a pretty big group with a lot of files, would that be any limitation?

from telegram_media_downloader.

fabianski7 avatar fabianski7 commented on June 11, 2024

my config file

api_hash: xxxx
api_id: xxxx
chat_id: xxxx
last_read_message_id: 0
media_types:
- document
file_formats:
  document:
  - mobi

from telegram_media_downloader.

fabianski7 avatar fabianski7 commented on June 11, 2024

this all generated a media_downloader.session file of about 3.2M

from telegram_media_downloader.

Dineshkarthik avatar Dineshkarthik commented on June 11, 2024

@fabianski7 can you create this as a new issue, we can look into it there.

from telegram_media_downloader.

Sirfrancis18 avatar Sirfrancis18 commented on June 11, 2024

@fabianski7 can you create this as a new issue, we can look into it there.

os posible only download by Who sended? only download files by x person in the group

from telegram_media_downloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.