Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TelegramBridge] Getting posts beyond last page #3874

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

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

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