readability-bot icon indicating copy to clipboard operation
readability-bot copied to clipboard

Update webhook.js

Open Sayarkhwab opened this issue 9 months ago • 1 comments

response should be resp. And why newly deployed bot is not making IV but yours doing.

Screenshot_20250515-191751067

Screenshot_20250515-191713863

Sayarkhwab avatar May 15 '25 13:05 Sayarkhwab

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
readability-bot ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2025 1:53pm

vercel[bot] avatar May 15 '25 13:05 vercel[bot]

Thanks!

Gowee avatar May 19 '25 05:05 Gowee

And why newly deployed bot is not making IV but yours doing.

Instant View expects a manually configured IV template (parsing rules) for each domain. Templates of popular websites are selected to be built-in. For custom domains, we use the special URL https://t.me/iv?.....rhash=...., where rhash identifies a specific template for a specific domain.

Therefore, we need to create a template and get a rhash at first:

  1. Navigate to https://instantview.telegram.org/my/.
  2. Paste the url to an "readable" article (e.g. https://readability-bot.vercel.app/api/readability?url=https%3A%2F%2Fwww.bbc.com%2Fnews%2Farticles%2Fc787j90wp6po) and press Enter.
  3. Copy & paste rules.iv as the template rules.
  4. Click "View in Telegram" and a rhash associated with the newly template will be shown in the params of the URL.

Then, specify the IV_RHASH and other necessary envvar.

Gowee avatar May 19 '25 05:05 Gowee