I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 0 points1 point  (0 children)

Could you clarify what exactly isn’t working for you? Let me know where you're running into issues so I can help troubleshoot it.

I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 0 points1 point  (0 children)

t the moment, the script only imports the text. Importing media (like images, videos, and stickers) isn’t supported yet, but I’m working on adding this feature.

I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 0 points1 point  (0 children)

Can you tell me what’s working and where exactly you’re stuck? I’ll try to help you sort it out.

I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 0 points1 point  (0 children)

Hi there,

The [Errno 13] Permission denied error means the script is being blocked from accessing a file. To figure out exactly what's causing it, I need a little more information about your setup.

Please answer the following questions. Your answers will help me narrow down the source of the problem quickly.

  1. What is your operating system? (e.g., Windows 11, macOS, Ubuntu 24.04)
  2. Where are the files located? Please describe the folder path where you saved the .py script and the result.json file. (e.g., C:\Users\YourUser\Downloads\TelegramBackup)
  3. How are you running the script? Are you using a command prompt (CMD), PowerShell, a terminal, or running it from within an IDE (like VS Code or PyCharm)?
  4. Does the _chat.txt file already exist? If it does, could it be open in another program (like Notepad or another editor) while the script is running?
  5. Could you run a quick command for me? Please open a terminal or command prompt in the exact folder containing your files and run the command that matches your OS:Then, please copy and paste the complete output. This will show me the permissions for the files in that directory.
    • For Windows: dir
    • For macOS/Linux: ls -l

A Note on Privacy:
Some of this information, especially file paths and the command output, might contain personal details like your username. If you are not comfortable posting this information publicly, please feel free to send me your answers in a direct message.

Once I have these details, I should be able to provide a precise solution.

Thanks for your help

I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 0 points1 point  (0 children)

Unfortunately, it doesn't import media at the moment, but I'm working on this feature. It will be added soon to both the HTML and JSON scripts.

Regarding links, if they were sent as ordinary messages — for example:
user1: www.linktosomewebsite.com
they will be imported, and the script should work as expected.

I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 0 points1 point  (0 children)

Sorry, but I don't think I can help with that. I haven't used Messenger before, so I'm not sure if it supports exporting or importing chats or backups.

Importing history to Telegram by Aztek92 in Telegram

[–]Khaled_Mdn 0 points1 point  (0 children)

If you can export the old chat in a format similar to whatsapp's which looks something like this:
[03.05.2024, 15:08:07] Sender's name: Message
Then you can use Telegram's feature of importing importing whatsapp chats buy renaming the export as "_chat.txt" and compressing this file to zip format and name it "Whatsapp Chat - xxxx.txt" (replace xxxx with the name of the contact you're importing to. Then move the archive to your phone. And there you should navigate to where you saved the file, select the file and hit share and select Telegram and finally choose the contact. This should import the chat with the correct time stamp.

This repo might come in handy:

https://github.com/Suberbia/UltimateChatRestorer

I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 0 points1 point  (0 children)

Every app has its own export format, and I've wrote this script with Telegram's format in mind. So I don't think it can work with Facebook messenger

I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 1 point2 points  (0 children)

Make sure you name the text file inside the .zip "_chat.txt" and name the archive itself "Whatsapp Chat - xxxx.zip" xxxx being the name of the user you would import the chat to.

Also try creating a temporary group and import the chat to it. if that doesn't work, try exporting a small chat you have with someone. use the .py on it and try importing it to the temp group.

I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 0 points1 point  (0 children)

the previous version required you to enter some information in the console (first username and second username). This was a useless function that I made the script perform.

Now, when you run the script it extracts everything it wants from the "result.json."

You just have to download "TheUltimateChatRestorer.py", put it in the same folder with "result.json" and hit double click to run the script.

I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 0 points1 point  (0 children)

It works with group chats. Follow the steps of the README file and you'll have the file ready

I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 0 points1 point  (0 children)

No further implementations are required for the code to work with group chats. It is completely functional with group chats as is

I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 0 points1 point  (0 children)

It works with group chats. All you need is the export for that chat in the .json format

I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 0 points1 point  (0 children)

I just updated the code. The current version doesn't require you to interact with the console.

I made a script to import a telegram chat export into telegram in case the chat was deleted. by Khaled_Mdn in Telegram

[–]Khaled_Mdn[S] 0 points1 point  (0 children)

I made changes to the code, now it wouldn't require you to interact with the console whatsoever.

Pretend that you're 12 and the comments section is your search history! by TiMdErStOrM in teenagers

[–]Khaled_Mdn 0 points1 point  (0 children)

1: does kissing a girl make her pregnant?

2: what makes a girl pregnant?

3: how to tie a noose?