Skip to content

[TelegramBridge] Getting posts beyond last page#3874

Closed
n-kam wants to merge 2 commits intoRSS-Bridge:masterfrom
n-kam:TelegramBridge-Getting-posts-beyond-last-20
Closed

[TelegramBridge] Getting posts beyond last page#3874
n-kam wants to merge 2 commits intoRSS-Bridge:masterfrom
n-kam:TelegramBridge-Getting-posts-beyond-last-20

Conversation

@n-kam
Copy link

@n-kam n-kam commented Jan 2, 2024

Fixes #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.

@github-actions
Copy link

github-actions bot commented Jan 2, 2024

Pull request artifacts

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

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

@dvikan
Copy link
Contributor

dvikan commented Jan 3, 2024

@VerifiedJoseph

@dvikan
Copy link
Contributor

dvikan commented Mar 31, 2024

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

@dvikan
Copy link
Contributor

dvikan commented Jun 18, 2024

linter upgrade disallows sizeof function.

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

@dvikan
Copy link
Contributor

dvikan commented Jan 3, 2025

lets followup on this one and get pagination working for telegram bridge

@dvikan
Copy link
Contributor

dvikan commented Jan 4, 2025

@n-kam I added this feature in master. Please help me test it.

@dvikan dvikan closed this Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TelegramBridge] Disable limit to the number of parsed articles

2 participants