mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-09-09 01:36:41 +08:00
feat(frontend): 新增多版本笔记功能,并做了向下兼容。
- 新增关于页面组件,介绍项目背景、功能和使用方法 - 重构笔记生成逻辑,支持多版本笔记 - 新增笔记版本选择、复制和导出功能 -优化笔记界面布局和交互 - 调整部分组件样式,提升用户体验
This commit is contained in:
@@ -249,13 +249,21 @@ class DouyinDownloader(Downloader):
|
||||
)
|
||||
|
||||
def download_video(self, video_url: str, output_dir: Union[str, None] = None) -> str:
|
||||
|
||||
try:
|
||||
|
||||
if output_dir is None:
|
||||
output_dir = get_data_dir()
|
||||
if not output_dir:
|
||||
output_dir = self.cache_data
|
||||
os.makedirs(output_dir, exist_ok=True)
|
||||
|
||||
video_id = self.extract_video_id(video_url)
|
||||
video_path = os.path.join(output_dir, f"{video_id}.mp4")
|
||||
if os.path.exists(video_path):
|
||||
return video_path
|
||||
|
||||
|
||||
output_path = os.path.join(output_dir, "%(id)s.%(ext)s")
|
||||
|
||||
video_data = self.fetch_video_info(video_url)
|
||||
|
||||
Reference in New Issue
Block a user