添加文章页自定义html标签
##{"html":""}##
This commit is contained in:
parent
be545404f2
commit
88e434cb26
4
Gmeek.py
4
Gmeek.py
@ -8,6 +8,7 @@ import shutil
|
||||
import urllib
|
||||
import requests
|
||||
import argparse
|
||||
import html
|
||||
from github import Github
|
||||
from xpinyin import Pinyin
|
||||
from feedgen.feed import FeedGenerator
|
||||
@ -158,6 +159,9 @@ class GMEEK():
|
||||
f'color: var(--fgColor-{style},var(--color-{style}-fg));}}</style>'
|
||||
)
|
||||
|
||||
if '##{"html":' in post_body:
|
||||
post_body=re.sub(r'##\{"html":"(.*?)"\}##',lambda x: html.unescape(x.group(1)),post_body,flags=re.DOTALL)
|
||||
|
||||
postBase["postTitle"]=issue["postTitle"]
|
||||
postBase["postUrl"]=self.blogBase["homeUrl"]+"/"+issue["postUrl"]
|
||||
postBase["description"]=issue["description"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user