Open belext opened 11 months ago
Great, thanks for the contribution! I'll have a look and merge it in if everything looks ok 😉
No problem!
Though I found an issue with my script: it doesn't assign file extensions for round videos (mp4) and voice messages (ogg).
I tried modifying myMedia.file_name
(adding an extension to it), but it didn't work (even after I made a deep copy of the object). Looks like the file name is returned by the server as a part of Content-Disposition
after a download/id
GET request is made.
It's strange because at one moment it returned correct file names for me. I'll see if I can fix it in the coming days.
Hello!
I was inspired by your work and made an alternative script: GreasyFork
Attaching the code here as well.
Telegram Web - Allow Saving Content It only works on the WebK version (and redirects to it from WebA). Uses some built-in functions I found in the global objects. Supports any type of media and auto sets file names and extensions.
Feel free to reuse any parts of this code, as well as adapt it for WebA. I don't plan to add WebA support myself.
hello ! actulay there is lot of content and i dont want to downlaod ALL and i want to share it to my saved files , can you do that
@Leo-camp if you mean you want to unlock Forward Message feature in restricted channels, unfortunately it's not possible at the moment. I did spend a little time trying to add forwarding too, but the function I needed wasn't accessible easily. But I'll try once again today or tomorrow.
As for the file extensions for round videos and voice messages, I couldn't find a solution so far. But at least file names are set correctly, and you can always add .mp4 for videos and .ogg for voice messages manually.
@Leo-camp if you mean you want to unlock Forward Message feature in restricted channels, unfortunately it's not possible at the moment. I did spend a little time trying to add forwarding too, but the function I needed wasn't accessible easily. But I'll try once again today or tomorrow.
As for the file extensions for round videos and voice messages, I couldn't find a solution so far. But at least file names are set correctly, and you can always add .mp4 for videos and .ogg for voice messages manually.
thanku you , if can add forwading messages from restricted group to saved meaage it will be great help
@Leo-camp so unfortunately you can't forward messages with noForwards
flag (it's restricted from the server side).
But I added batch download of all media from selected messages in version 0.3 of my script. So you can update it on GreasyFork and test.
To the repo owner: I'm sorry that I use this issue for communication purposes. Feel free to close it.
@lls-fan thanks for the answer ,
but i have seen bots on telegram that can clone the video or any message from restricted group and then you can share or download that message easily .
but the only downside is you have copy link of each message or file and paste it in the bot , for it work . so if you can you can find a way to clone a batch of files , (p.s : i have tried sharing grp link to bot but it didn't work) then may be we can share it .
@Leo-camp I see, the bots probably download every piece of media from the message and send it again as a new one. But it's not easy to do it in a userscript, since you don't have the backend and can only work with existing Telegram Web functions.
Anyway, I don't plan to spend any more time on new features since I made this script for a friend who wanted an easy solution that worked on the official Web version. I know there are some Telegram apps and patches that have restrictions removed by default. I think I've seen some clients that also allow to forward messages in a way that generates a new post with original author removed. Maybe someone can investigate how it works and try to recreate it in a userscript. But it won't be easy for sure.
@lls-fan ok no problem., but have you tried the patch , which you mention which allow copy messages, does it work
Didnot work mate. thanks
@infag67789, if you're using my version of a script, you need to right click the media and then hit Download. Or select multiple messages (using right click - select) and hit the D/L button.
Oh great, working. How can i download the caption below the video mate? And next question, how can I download the .json/.apk format? is it using the different script?
To the repo owner: I'm sorry that I use this issue for communication purposes. Feel free to close it.
No worry @lls-fan , I will keep this thread open just for my own reference. Unfortunately I'm too busy this week to work on this, but as you also published your version I think people will be able to use both if they want :)
Also, if you would like, feel free to turn this into a PR. Though I have noticed there's a lot of difference and it may take some effort on merge these two scripts.
Very good, but when I start downloading the content it displays download canceled by Google Chrome using telegram web K, only files below 1gb can be downloaded
Script currently (November 19, 2023) does not work at all.
it doest work there is no button for downloading
it doest work there is no button for downloading
@Asyany, hi there! If you are talking about my script, it still works fine on the latest Telegram WebK version. Tested it just today.
only files below 1gb can be downloaded
@italo2480, this might be an actual issue since I haven't tried downloading big files. But since I use the built-in download function, maybe it's a problem on Telegram's side. UPD: Tested downloading of big restricted files and videos: worked fine for 1.2 GB and 1.8 GB. So there shouldn't be any issues.
Can you add the option to select all files or a specific amount?
Hello!
I was inspired by your work and made an alternative script: GreasyFork
It only works on the WebK version (and redirects to it from WebA). Uses some built-in functions I found in the global objects.
Supports any type of media and auto sets file names and extensions.
Feel free to reuse any parts of this code, as well as adapt it for WebA. I don't plan to add WebA support myself.