acgtools / hanime-hunter

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

Cannot download a specific video #17

Closed Casshernsins closed 11 months ago

Casshernsins commented 11 months ago

Describe the bug

Downloading Summer: Inaka no Seikatsu 1 from hanime results in error: Directory name is invalid.

How To Reproduce

Site: hanime.tv Video: https://hanime.tv/videos/hentai/summer-inaka-no-seikatsu-1 Steps:

Expected behavior

To download

Actual behavior

Gave an error

Screenshots (Optional)

![2023-12-23 17_10_32-](https://github.com/acgtools/hanime-hunter/assets/136099100/d3bcde85-451b-494e-94b4-a9ed9cbdc095) ### Environment
# Get the version info
$ hani version

Additional context (Optional)

dreamjz commented 11 months ago

It's a bug, I'll fix it in next version v0.3.1.

The directory name summer: xxx contains :, which is forbidden in Windows folder names.

Can you provide the environment info to help determine whether it is running on Windows?

Execute the version cmd to get env info:

# Get the version info
$ hani version 
Version: unknown, Go: go1.21.5, Platform: linux/amd64
Casshernsins commented 11 months ago

Version: 0.3.0, Go: go1.21.4, Platform: windows/amd64

I also can't download imaizumin ep 1 but others I can.

panic: crypto/cipher: input not full blocks

                                       goroutine 55 [running]:
                                                              crypto/cipher.(*cbcDecrypter).CryptBlocks(0xe2d390?, {0xc0001ca160?, 0xc0003ba000?, 0x10?}, {0xc000372200?, 0xc0003cdcf8?, 0x0?})
                                                                                              /opt/hostedtoolcache/go/1.21.4/x64/src/crypto/cipher/cbc.go:145 +0x411
                                                                 github.com/acgtools/hanime-hunter/pkg/util.AESDecrypt({0xc000372200, 0xa2, 0x200}, {0xc0003ba000?, 0x0?, 0xc00017bd30?}, {0xc0003ba000, 0xc00002c4d0?, 0x200})
                            /home/runner/work/hanime-hunter/hanime-hunter/pkg/util/crypto.go:18 +0xe2
  github.com/acgtools/hanime-hunter/internal/downloader.saveTS({0xc00002c4d0, 0x6b}, {0xc00001c740, 0x38}, {0xc0003ba000, 0x10, 0x200}, {0xc0003ba000, 0x10, 0x200})
                                                                    /home/runner/work/hanime-hunter/hanime-hunter/internal/downloader/downloader.go:275 +0x2cc
                                                           github.com/acgtools/hanime-hunter/internal/downloader.saveM3U8.saveM3U8.func1.func2()
                                                    /home/runner/work/hanime-hunter/hanime-hunter/internal/downloader/downloader.go:171 +0x251
                                           golang.org/x/sync/errgroup.(*Group).Go.func1()
                                                                                            /home/runner/go/pkg/mod/golang.org/x/sync@v0.5.0/errgroup/errgroup.go:75 +0x56
                                                                       created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 34
                                            /home/runner/go/pkg/mod/golang.org/x/sync@v0.5.0/errgroup/errgroup.go:72 +0x96
dreamjz commented 11 months ago

Thanks for your bug report.

I'll check this bug later.

Since the Directory name is invalid bug has been fixed in version v0.3.1, I will close this old issue and create a new one #23 for the next version.

Casshernsins commented 10 months ago

GoSys dl -q "720" https://hanime.tv/videos/hentai/imaizumin-chi-wa-douyara-gal-no-tamariba-ni-natteru-rashii-1 INFO Site: hanime.tv INFO Anime found: Imaizumin-chi wa Douyara Gal, Searching episodes, Please wait a moment... INFO Episodes found: [imaizumin-chi-wa-douyara-gal-no-tamariba-ni-natteru-rashii-1] INFO Start downloading ...

Press ctrl+c to quit

panic: crypto/cipher: input not full blocks

                                       goroutine 166 [running]:
                                                               crypto/cipher.(*cbcDecrypter).CryptBlocks(0xbcd790?, {0xc0000c64d0?, 0xc000208400?, 0x10?}, {0xc00012a000?, 0xc0002c3cd8?, 0x0?})
                                                                            /opt/hostedtoolcache/go/1.21.5/x64/src/crypto/cipher/cbc.go:145 +0x411
                          github.com/acgtools/hanime-hunter/pkg/util.AESDecrypt({0xc00012a000, 0xa2, 0x200}, {0xc000208400?, 0xc0004e1d10?, 0x6cc953?}, {0xc000208400, 0x6c?, 0x200})
                                                                    /home/runner/work/hanime-hunter/hanime-hunter/pkg/util/crypto.go:18 +0xe2
                     github.com/acgtools/hanime-hunter/internal/downloader.saveTS({0xc000706000, 0x6c}, {0xc000377380, 0x39}, {0xc000208400, 0x10, 0x200}, {0xc000208400, 0x10, 0x200})
                                                                    /home/runner/work/hanime-hunter/hanime-hunter/internal/downloader/downloader.go:319 +0x2de
                                      github.com/acgtools/hanime-hunter/internal/downloader.(*Downloader).saveM3U8.(*Downloader).saveM3U8.func1.func2()
                                    /home/runner/work/hanime-hunter/hanime-hunter/internal/downloader/downloader.go:219 +0x290
      golang.org/x/sync/errgroup.(*Group).Go.func1()
                                                            /home/runner/go/pkg/mod/golang.org/x/sync@v0.5.0/errgroup/errgroup.go:75 +0x56
                  created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 10
                                                                                    /home/runner/go/pkg/mod/golang.org/x/sync@v0.5.0/errgroup/errgroup.go:72 +0x96