From 7b0e173653bdf2d68326ad682619d34c8c3d1932 Mon Sep 17 00:00:00 2001 From: Pankovea <114323250+Pankovea@users.noreply.github.com> Date: Fri, 26 May 2023 17:47:39 +0300 Subject: [PATCH 1/3] requerements.txt --- requerements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 requerements.txt diff --git a/requerements.txt b/requerements.txt new file mode 100644 index 0000000..a377460 --- /dev/null +++ b/requerements.txt @@ -0,0 +1 @@ +Telethon==1.28.5 -- 2.47.2 From f9d525ef3fcbbf55b92fd6db21d1900142997af8 Mon Sep 17 00:00:00 2001 From: Pankovea <114323250+Pankovea@users.noreply.github.com> Date: Fri, 26 May 2023 17:47:49 +0300 Subject: [PATCH 2/3] gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index a6c849b..7576429 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ *.json # Ini file with privat info *.ini +# VS Code +.vscode +venv \ No newline at end of file -- 2.47.2 From 724797cb35a76d5c69ebff4a1e3f606b8a8ca5f3 Mon Sep 17 00:00:00 2001 From: Pankovea <114323250+Pankovea@users.noreply.github.com> Date: Fri, 26 May 2023 17:48:16 +0300 Subject: [PATCH 3/3] =?UTF-8?q?=D1=84=D0=B0=D0=B9=D0=BB=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=BE=D1=82=D1=81=D0=BB=D0=B5=D0=B6=D0=B8=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=3D=20channel.id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tele_reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tele_reader.py b/tele_reader.py index de6057b..beac41f 100644 --- a/tele_reader.py +++ b/tele_reader.py @@ -95,7 +95,7 @@ async def dump_all_messages(channel): if total_count_limit != 0 and total_messages >= total_count_limit: break - with open('channel_messages.json', 'w', encoding='utf8') as outfile: + with open(f'{channel.id}_messages.json', 'w', encoding='utf8') as outfile: json.dump(all_messages, outfile, ensure_ascii=False, cls=DateTimeEncoder) -- 2.47.2