mirror of https://github.com/yutto-dev/yutto
parent
b592110d6a
commit
a3b63ef23c
|
@ -299,7 +299,10 @@ yutto <url> -c "d8bc7493%2C2843925707%2C08c3e*81"
|
|||
|username|UP 主用户名|个人空间、收藏夹、合集、视频列表下载|
|
||||
|series_title|合集标题|收藏夹、视频合集、视频列表下载|
|
||||
|pubdate|投稿日期|仅投稿视频|
|
||||
|download_date|下载日期|全部|
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> 未来可能会对路径变量及默认路径模板进行调整
|
||||
|
||||
#### url 别名文件路径
|
||||
|
|
|
@ -168,7 +168,7 @@ def _parse_bangumi_metadata(item: dict[str, Any]) -> MetaData:
|
|||
plot=item["share_copy"],
|
||||
thumb=item["cover"],
|
||||
premiered=get_time_str_by_stamp(item["pub_time"]),
|
||||
dataadded=get_time_str_by_now(),
|
||||
dateadded=get_time_str_by_now(),
|
||||
source="", # TODO
|
||||
original_filename="", # TODO
|
||||
)
|
||||
|
|
|
@ -248,7 +248,7 @@ def _parse_ugc_video_metadata(video_info: _UgcVideoInfo, page_info: _UgcVideoPag
|
|||
plot=video_info["description"],
|
||||
thumb=page_info["first_frame"] if page_info["first_frame"] is not None else video_info["picture"],
|
||||
premiered=get_time_str_by_stamp(video_info["pubdate"]),
|
||||
dataadded=get_time_str_by_now(),
|
||||
dateadded=get_time_str_by_now(),
|
||||
source="", # TODO
|
||||
original_filename="", # TODO
|
||||
)
|
||||
|
|
|
@ -57,6 +57,7 @@ async def extract_bangumi_data(
|
|||
"username": UNKNOWN,
|
||||
"series_title": UNKNOWN,
|
||||
"pubdate": UNKNOWN,
|
||||
"download_date": bangumi_info["metadata"]["dateadded"],
|
||||
}
|
||||
subpath_variables_base.update(subpath_variables)
|
||||
subpath = resolve_path_template(args.subpath_template, auto_subpath_template, subpath_variables_base)
|
||||
|
@ -100,6 +101,7 @@ async def extract_ugc_video_data(
|
|||
"username": UNKNOWN,
|
||||
"series_title": UNKNOWN,
|
||||
"pubdate": UNKNOWN,
|
||||
"download_date": ugc_video_info["metadata"]["dateadded"],
|
||||
}
|
||||
subpath_variables_base.update(subpath_variables)
|
||||
subpath = resolve_path_template(args.subpath_template, auto_subpath_template, subpath_variables_base)
|
||||
|
|
|
@ -6,8 +6,7 @@ from typing import Literal, Union
|
|||
|
||||
from yutto.utils.console.logger import Logger
|
||||
|
||||
path_template_variables = ["title", "id", "name", "username"]
|
||||
PathTemplateVariable = Literal["title", "id", "name", "username", "series_title", "pubdate"]
|
||||
PathTemplateVariable = Literal["title", "id", "name", "username", "series_title", "pubdate", "download_date"]
|
||||
PathTemplateVariableDict = dict[PathTemplateVariable, Union[int, str]]
|
||||
UNKNOWN: str = "unknown_variable"
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ class MetaData(TypedDict):
|
|||
plot: str
|
||||
thumb: str
|
||||
premiered: str
|
||||
dataadded: str
|
||||
dateadded: str
|
||||
source: str
|
||||
original_filename: str
|
||||
|
||||
|
|
Loading…
Reference in New Issue