acgtools / hanime-hunter

A CLI app to download HAnime. 用于下载里番的 CLI 工具
GNU General Public License v3.0
140 stars 12 forks source link

[BUG]: The '/' symbol in the video name will result in an error in the download path. #29

Closed Kirrito-k423 closed 8 months ago

Kirrito-k423 commented 9 months ago

描述出现的问题

视频名称里出现的/符号, 会导致下载路径生成错误

如何复现

example 1

S:/x18/hanime took 45s
❯ hani.exe dl https://hanime1.me/watch?v=89745
INFO Site: hanime1.me
INFO Anime found: Shinshi No.52, Searching episodes, Please wait a moment...
INFO Episodes found: "[Shinshi No.52] ルアンメェイ・生命の探究 / Ruan Mei: research of life"
INFO Start downloading ...

  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   0%  0.00 MiB/68.65 MiB  [Shinshi No.52] ルアンメェイ・生命の探究 / Ruan Mei: research of life

Press ctrl+c to quit

ERRO dl: download file "[Shinshi No.52] ルアンメェイ・生命の探究 / Ruan Mei: research of life": create file "Shinshi No.52\\[Shinshi No.52] ルアンメェイ・生命の探究 \\ Ruan Mei: research of life 1080p.octet-stream": open Shinshi No.52\[Shinshi No.52] ルアンメェイ・生命の探究 \ Ruan Mei: research of life 1080p.octet-stream: The system cannot find the path specified.

example 2

S:/x18/hanime
❯ $env:https_proxy = "http://127.0.0.1:7890"

S:/x18/hanime
❯ hani.exe dl -s https://hanime1.me/watch?v=89744
INFO Site: hanime1.me
INFO Anime found: Tir_Al, Searching episodes, Please wait a moment...
INFO Episodes found [`[Tir_Al] 2024. 01. Arlecchino [All scene/4k]`]
INFO Start downloading ...

  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   0%  0.00 MiB/34.92 MiB  [Tir_Al] 2024. 01. Arlecchino [All scene/4k] 1080p.mp4  Error

Press ctrl+c to quit

ERRO dl: download file "[Tir_Al] 2024. 01. Arlecchino [All scene/4k]": create file "Tir_Al\\[Tir_Al] 2024. 01. Arlecchino [All scene\\4k] 1080p.mp4": open Tir_Al\[Tir_Al] 2024. 01. Arlecchino [All scene\4k] 1080p.mp4: The system cannot find the path specified.

运行环境

S:/x18/hanime took 3s
❯ hani.exe version
Version: 0.3.1, Go: go1.21.5, Platform: windows/amd64
dreamjz commented 8 months ago

Thank you for your report, I'll fix it in next version