在Java中检索Telegram频道的所有消息的最简单方法?

发布于 2025-01-20 13:37:00 字数 494 浏览 0 评论 0原文

我希望这个问题不是太笼统。

我正在寻找一种方法来检索已在 Telegram 频道上发布的所有消息(包括媒体),以及每条消息的所有评论(包括有关作者、发布时间等的常用元数据...... )在Java中。

我很难找到解决方案:搜索结果被 Telegram Bot API 污染,据我了解,这不是我需要的。我看到有一个带有 JNI 绑定的 TDlib 库,安装起来似乎很痛苦。我还找到了 org.telegram.telegramapi 的 Maven 存储库,但我有无法找到一个简单的代码片段来解释如何初始化库并执行最常见的操作。

这里最好的解决方案是什么?这是我列出的两个之一还是我遗漏了一些东西?

I hope this question is not too general.

I'm looking for a way to retrieve all the messages (including media) that have been posted on a Telegram channel, and also all the comments to each message (including commonly available metadata about the author, time of post, etc...) in Java.

I'm having a very hard time to find a solution: search results are polluted with the Telegram Bot API, which is, as far as I understand it, not what I need. I've seen there is a TDlib library with JNI bindings, which seems a pain in the ass to install. I've also found this Maven repository for org.telegram.telegramapi, but I have not been able to find a simple code snippet that explains how to initialize the library and perform the most common operations.

What is the best solution here? Is it one of the two I listed or I am missing something?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

牵强ㄟ 2025-01-27 13:37:00

Check this, there is some language's example: https://github.com/tdlib/td/tree/master/example

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文