-
-
Notifications
You must be signed in to change notification settings - Fork 362
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
Telegram 发送内容比较多的 Markdown 消息报错:Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 4030 #88
Labels
bug
Something isn't working
Comments
这个问题出在 Telegram 对 Markdown 的解析。如果内容比较多,Message Pusher 会对其进行拆分。对于 Markdown 内容,拆分点如果不合适的话会导致报错。 这个问题并不好解决,Message Pusher 必须要能解析 Markdown 文本并在最大消息长度前找到合适的拆分点才能避免该问题。 |
songquanpeng
changed the title
telegram发送内容比较多的markdown报错
Telegram 发送内容比较多的 Markdown 消息报错:Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 4030
May 16, 2023
我想到一种比较简单的解决方法,即通过句号分隔消息,然后进行拼接,同时保证长度不超标,应该足以应付大多数场景了。 |
或许可以试试将内容存储到telegra.ph telegram好像完美支持这个网站的即时预览 |
目前不打算依赖第三方服务哈,这个问题会解决的
…---Original---
From: ***@***.***>
Sent at: 2023年5月19日(Fri) PM5:28
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [songquanpeng/message-pusher] Telegram 发送内容比较多的 Markdown 消息报错:Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 4030 (Issue #88)
或许可以试试将内容存储到telegra.ph telegram好像完美支持这个网站的即时预览
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
嗯嗯,希望能有解决方案,这是telegram官方推出的一个匿名平台
…------------------ 原始邮件 ------------------
发件人: JustSong ***@***.***>
发送时间: 2023-05-19 17:33:15
收件人: songquanpeng/message-pusher ***@***.***>
抄送: "我若为王" ***@***.***>,Author ***@***.***>
主题: Re: [songquanpeng/message-pusher] Telegram 发送内容比较多的 Markdown 消息报错:Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 4030 (Issue #88)
目前不打算依赖第三方服务哈,这个问题会解决的
---Original---
From: ***@***.***>
Sent at: 2023年5月19日(Fri) PM5:28
To: ***@***.***>
Cc: ***@***.******@***.***>
Subject: Re: [songquanpeng/message-pusher] Telegram 发送内容比较多的 Markdown 消息报错:Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 4030 (Issue #88)
或许可以试试将内容存储到telegra.ph telegram好像完美支持这个网站的即时预览
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
官方的话可以考虑一下,我先调查一下
…---Original---
From: ***@***.***>
Sent at: 2023年5月19日(Fri) PM5:37
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [songquanpeng/message-pusher] Telegram 发送内容比较多的 Markdown 消息报错:Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 4030 (Issue #88)
嗯嗯,希望能有解决方案,这是telegram官方推出的一个匿名平台
------------------ 原始邮件 ------------------
发件人: JustSong ***@***.***>
发送时间: 2023-05-19 17:33:15
收件人: songquanpeng/message-pusher ***@***.***>
抄送: "我若为王" ***@***.***>,Author ***@***.***>
主题: Re: [songquanpeng/message-pusher] Telegram 发送内容比较多的 Markdown 消息报错:Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 4030 (Issue #88)
目前不打算依赖第三方服务哈,这个问题会解决的
---Original---
From: ***@***.***&gt
Sent at: 2023年5月19日(Fri) PM5:28
To: ***@***.***&gt
Cc: ***@***.******@***.***&gt
Subject: Re: [songquanpeng/message-pusher] Telegram 发送内容比较多的 Markdown 消息报错:Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 4030 (Issue #88)
或许可以试试将内容存储到telegra.ph telegram好像完美支持这个网站的即时预览
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***&gt
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
这个平台的 content 格式不好适配,我目前还是打算采用之前的方法进行分隔。 |
已修复,目前的解决方案是在最大消息长度的索引前面找一个最近的 已推送版本 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 4030
内容少的就能发送成功
The text was updated successfully, but these errors were encountered: