mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2026-03-22 15:07:17 +08:00
style: 代码格式化和字符串处理优化
- 优化代码缩进和换行,提高可读性 - 统一使用单引号或双引号,保持一致性 - 移除冗余的空格和括号,精简代码
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from source.expansion import Namespace
|
||||
from .request import Html
|
||||
|
||||
__all__ = ['Video']
|
||||
__all__ = ["Video"]
|
||||
|
||||
|
||||
class Video:
|
||||
@@ -13,5 +13,8 @@ class Video:
|
||||
|
||||
@classmethod
|
||||
def get_video_link(cls, data: Namespace) -> list:
|
||||
return [Html.format_url(f"https://sns-video-bd.xhscdn.com/{t}")] if (
|
||||
t := data.safe_extract(".".join(cls.VIDEO_LINK))) else []
|
||||
return (
|
||||
[Html.format_url(f"https://sns-video-bd.xhscdn.com/{t}")]
|
||||
if (t := data.safe_extract(".".join(cls.VIDEO_LINK)))
|
||||
else []
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user