将消息列表爬取到的说说图片替换为高清图

This commit is contained in:
SwimmingLiu 2024-09-16 00:37:30 +08:00
parent 1cd373be8c
commit c36484e423

View File

@ -75,6 +75,9 @@ def render_html(shuoshuo_path, zhuanfa_path):
image_html = '<div class="image">'
for img_url in img_url_lst:
if img_url and img_url.startswith('http'):
# 将图片替换为高清图
img_url = str(img_url).replace("/m&ek=1&kp=1", "/s&ek=1&kp=1")
img_url = str(img_url).replace(r"!/m/", "!/s/")
image_html += f'<img src="{img_url}" alt="图片">\n'
image_html += "</div>"
comment_html = ""