Commit 7230722

benny-dou <60535774+benny-dou@users.noreply.github.com>
2025-06-09 12:06:04
style(podcast): improve Telegraph style
1 parent 4f0a59d
Changed files (1)
src
others
src/others/podcast.py
@@ -90,7 +90,7 @@ async def summary_pods(client: Client):
                 subtitles = asr_res.get("texts", "")
                 subtitle_caption = f"🎧播客: [{feed_title}]({pod_url})\n📝标题: [{entry['title']}]({entry['link']})\n🕒日期: {pubdate}\n⏳时长: {readable_time(entry['itunes_duration'])}"
                 subtitle_caption += f"\n#️⃣字数: {count_subtitles(subtitles)}\n⏳阅读: {readable_time(60 * count_subtitles(subtitles) / READING_SPEED)}"
-                if telegraph_url := await publish_telegraph(title=entry["title"], html=convert_html(audio_caption + subtitles), author=feed_title, url=entry["link"]):
+                if telegraph_url := await publish_telegraph(title=entry["title"], html=convert_html(f"{audio_caption}\n{subtitles}"), author=feed_title, url=entry["link"]):
                     subtitle_caption += f"\n⚡️[即时预览]({telegraph_url})"
                 await send2tg(client, message, texts=remove_img(audio_caption), media=media, reply_msg_id=-1)  # Telegram DO NOT allow img tag in messages
                 with io.BytesIO(subtitles.encode("utf-8")) as f: