rss-bridge icon indicating copy to clipboard operation
rss-bridge copied to clipboard

[TelegramBridge] Getting posts beyond last page

Open n-kam opened this issue 1 year ago • 4 comments

Fixes https://github.com/RSS-Bridge/rss-bridge/issues/2084.

Bridge can now fetch previous posts beyond ones displayed on default webpage. This is pretty much a necessity for news aggregator channels with dozens of posts/day.

As the number of posts on a telegram webpage is not constant (I was getting anything from 4 to 20 posts for different channels), the bridge now fetches webpages with "...?before=..." param until post count matches requested number of posts OR the number of fetched pages reaches the hard-limit OR reaching the first post in the channel.

Although I tested the code manually on different channels, I'm very much an amateur programmer and moreover never wrote in PHP before. So sanity-checks would be nice.

n-kam avatar Jan 02 '24 21:01 n-kam

Pull request artifacts

Bridge Context Status
Telegram 1 untitled (current) ✔️
Telegram 1 untitled (pr) ✔️

last change: Monday 2024-01-08 12:43:03

github-actions[bot] avatar Jan 02 '24 21:01 github-actions[bot]

@VerifiedJoseph

dvikan avatar Jan 03 '24 05:01 dvikan

the bridge is improved but the code is confusing to me.

dvikan avatar Mar 31 '24 02:03 dvikan

linter upgrade disallows sizeof function.

i agree with @em92 this leads to extra requests to telegram servers. might be problematic

dvikan avatar Jun 18 '24 18:06 dvikan