RSS-Bridge / rss-bridge

The RSS feed for websites missing it
https://rss-bridge.org/bridge01/
The Unlicense
7.36k stars 1.04k forks source link

[TelegramBridge] Images in old posts do not load due to media URLs with expiration date #1901

Open ValdikSS opened 3 years ago

ValdikSS commented 3 years ago

Describe the bug URLs for media in Telegram returned in web preview (https://cdn4.telesco.pe/file/…) are not persistent, they work only for limited amount of time. Due to this fact, the older Telegram posts in the channel have broken images and other media elements in the RSS reader.

The bridge should implement a jumper URLs to the bridge script itself, which would update the links and redirect the request to working updated URLs with HTTP redirect.

To Reproduce Steps to reproduce the behavior:

  1. Subscribe to Telegram channel using RSS client
  2. Wait ≈2 days
  3. Open older posts containing media elements (images, video, audio)
  4. Result: no media is loaded

Expected behavior The media should be loaded even in the older posts.

Screenshots Screenshot_20201219_125058-fs8

The image URL returns HTTP 404.

Desktop (please complete the following information):

em92 commented 3 years ago

@VerifiedJoseph, do you have any idea how to implement those jumper URLs or other ways to solve this issue?

VerifiedJoseph commented 3 years ago

@ValdikSS, does your RSS reader not support local caching of images and other media? Jumper URLs is an interesting idea. I'm not sure how it would be implemented given how the bridges currently work.

ValdikSS commented 3 years ago

It does not.

VerifiedJoseph commented 3 years ago

Another option would be to cache the images on the server running the rss-bridge, that would simpler to implement.

ValdikSS commented 3 years ago

Telegram attachments may contain multi-gigabyte videos. I use public feed.eugenemolotov.ru feed, I'm sure it won't be implemented there, at least it will have some retention. I'd like to open RSS item of several months old and have working media in it, so it's not a complete solution.

em92 commented 3 years ago

@VerifiedJoseph, I have the idea. You could add one special context to TelegramBridge. The task of that context is not returning feeds, but make 302 redirections to that media by given URL or something that does identify that media.

With the bridge code addition, it is required to add code, that hides those special context inputs from bridge card.

squromiv commented 3 years ago

@em92 So should we wait for fix?

em92 commented 3 years ago

@squromiv no one is assigned to this task, so feel free to make PR.

squromiv commented 3 years ago

@em92 Unfortunately, I am not a software developer, so I can feel free only to make an issue. :-D

dumprop commented 3 years ago

I noticed that seems telegra.ph URLs have no expiration date image telesco.pe link is dead, telegra.ph no image So, anyway telegra.ph links seems more stable image