加入了抖音视频处理逻辑
This commit is contained in:
@@ -190,8 +190,13 @@ class DouyinParserPlugin(MessagePluginInterface):
|
|||||||
"""清理响应数据"""
|
"""清理响应数据"""
|
||||||
if not data:
|
if not data:
|
||||||
return data
|
return data
|
||||||
data[
|
default_cover = "https://is1-ssl.mzstatic.com/image/thumb/Purple221/v4/7c/49/e1/7c49e1af-ce92-d1c4-9a93-0a316e47ba94/AppIcon_TikTok-0-0-1x_U007epad-0-1-0-0-85-220.png/512x512bb.jpg"
|
||||||
'cover'] = "https://is1-ssl.mzstatic.com/image/thumb/Purple221/v4/7c/49/e1/7c49e1af-ce92-d1c4-9a93-0a316e47ba94/AppIcon_TikTok-0-0-1x_U007epad-0-1-0-0-85-220.png/512x512bb.jpg"
|
cover = data.get('cover')
|
||||||
|
if isinstance(cover, str):
|
||||||
|
c = cover.strip().strip('`')
|
||||||
|
data['cover'] = c if c.startswith('http') else default_cover
|
||||||
|
else:
|
||||||
|
data['cover'] = default_cover
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def _parse_douyin(self, url: str) -> Dict[str, Any]:
|
def _parse_douyin(self, url: str) -> Dict[str, Any]:
|
||||||
|
|||||||
Reference in New Issue
Block a user