From 54b13144a7496c21ca650058852b590c62b335af Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Tue, 17 May 2022 04:29:35 +0000 Subject: [PATCH] Rename session file for convenience --- README.md | 2 +- telegram-dl.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e53bae9..900b4a1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ All URLs must be messages in the same channel. The output consists of writing ea The only mandatory dependency of the script is Telethon. You probably want cryptg as well for performance reasons when downloading larger files. With tqdm installed, you get a progress bar for each download. -For authentication (always required), specify the `TELEGRAM_API_ID`, `TELEGRAM_API_HASH`, and `TELEGRAM_BOT_TOKEN` environment variables. The session is stored in a file `telegram-dl.session`; keeping this between executions is not critical but recommended. +For authentication (always required), specify the `TELEGRAM_API_ID`, `TELEGRAM_API_HASH`, and `TELEGRAM_BOT_TOKEN` environment variables. The session is stored in a file `.telegram-dl.session`; keeping this between executions is not critical but recommended. A `Dockerfile` is provided for running with Docker. Simply provide the URL(s) as arguments on running the image. Data is written to the `/data` volume, which you may want to mount from the host machine instead. diff --git a/telegram-dl.py b/telegram-dl.py index 7948139..0f81d34 100644 --- a/telegram-dl.py +++ b/telegram-dl.py @@ -54,7 +54,7 @@ async def main(): ids = [x[1] for x in targets] # Let's go... - client = telethon.TelegramClient('telegram-dl', API_ID, API_HASH) + client = telethon.TelegramClient('.telegram-dl', API_ID, API_HASH) print('Connecting', file = sys.stderr) await client.start(bot_token = BOT_TOKEN) print('Fetching messages', file = sys.stderr)