wolfswolke / aniworld_scraper

Aniworld.to mp4 scraper for animes.
MIT License
60 stars 17 forks source link

Season 1 has 0 Episodes [BUG] #31

Closed BarbokOL closed 10 months ago

BarbokOL commented 10 months ago

Describe the bug: Tried Howl's Moving Castle, using the .bat , it instantly closed so I used pause to see what was wrong, apparently it can't find episode 1 and therefore isn't downloading it. I am a bit bad when it comes to these things, what could I be doing wrong?

Steps to Reproduce the bug:

DEBUG:src.constants:cli argument detected on position:1 with value:anime DEBUG:src.constants:cli argument detected on position:2 with value:howls-moving-castle DEBUG:src.constants:cli argument detected on position:3 with value:Deutsch DEBUG:src.constants:cli argument detected on position:4 with value:True DEBUG:src.constants:cli argument detected on position:5 with value:0 INFO:src.start_app:------------- AnimeSerienScraper v01-10-00 started ------------ DEBUG:src.start_app:We have Read Permission DEBUG:src.start_app:We have Write Permission INFO:src.start_app:No Season override detected. INFO:src.start_app:We have this many seasons: 1 DEBUG:src.logic.collect_all_seasons_and_episodes:Entered get_movies DEBUG:charset_normalizer:Encoding detection on empty bytes, assuming utf_8 intention. DEBUG:src.logic.collect_all_seasons_and_episodes:Now leaving Function get_movies INFO:src.start_app:Season 1 has 0 Episodes. Press any key to continue . . .

Expected behavior: Downloading

Screenshots

Additional Info It creates the folders and file paths as normal it just can't find the "episode" and therefore the path remains empty and batch instant closes.

edit: I did try both with movie on False and True

Bramdarl commented 10 months ago

seems like the parameter for movie is not recognized as bool and the downloader always trys to download movies, even if they don't exist. Try to replace line 30 in constants.py with these one:

movie = (parse_cli_arguments(False, 4).lower() == 'true') # True = movie. False = episode

wolfswolke commented 10 months ago

@BarbokOL can you please test it again with the latest release version?

BarbokOL commented 10 months ago

@BarbokOL can you please test it again with the latest release version?

Thanks for the quick response, this is my new output after trying both yours and @Bramdarl answers.


> DEBUG:src.constants:cli argument detected on position:1 with value:anime
> DEBUG:src.constants:cli argument detected on position:2 with value:howls-moving-castle
> DEBUG:src.constants:cli argument detected on position:3 with value:Deutsch
> DEBUG:src.constants:cli argument detected on position:4 with value:False
> DEBUG:src.constants:cli argument detected on position:5 with value:1
> INFO:src.start_app:------------- AnimeSerienScraper v01-10-00 started ------------
> DEBUG:src.start_app:We have Read Permission
> DEBUG:src.start_app:We have Write Permission
> INFO:src.start_app:Season Override detected. Override set to: 1
> DEBUG:src.logic.collect_all_seasons_and_episodes:Entered get_episodes
> DEBUG:src.logic.collect_all_seasons_and_episodes:Now leaving Function get_episodes
> INFO:src.start_app:Season 1 has 1 Episodes.
> INFO:src.start_app:File name will be: howls-moving-castle/Season 01/howls-moving-castle - s01e01 - Deutsch.mp4
> DEBUG:src.logic.downloader:File not downloaded. Downloading: howls-moving-castle/Season 01/howls-moving-castle - s01e01 - Deutsch.mp4
> DEBUG:src.logic.search_for_links:Link to redirect is: https://aniworld.to/redirect/1832281
> DEBUG:src.start_app:Entered DDOS var check and starting new downloader.
> DEBUG:src.logic.search_for_links:Enterd VOE to cache
> DEBUG:src.logic.search_for_links:Exiting VOE to Cache
> DEBUG:src.start_app:VOE Cache URL is: https://delivery-node-ifqt22a1t0pptqlq.voe-network.net/engine/hls2-c/01/09042/wgwjhb6mwxwk_,n,.urlset/master.m3u8?t=NSzNiEfbq1xyJPJ0yr6hkvIuokmFCTMlHern5gstA-w&s=1703796346&e=14400&f=45210237&node=delivery-node-0gg4h2l6juwtfaev.voe-network.net&i=185.254&sp=2500&asn=3214
> DEBUG:src.logic.downloader:Entered Downloader.
> INFO:src.logic.downloader:File howls-moving-castle/Season 01/howls-moving-castle - s01e01 - Deutsch.mp4 added to queue.
> Exception in thread Thread-1 (download_and_convert_hls_stream):
> Traceback (most recent call last):
>   File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1045, in _bootstrap_inner
>     self.run()
>   File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 982, in run
>     self._target(*self._args, **self._kwargs)
>   File "H:\Downloads\aniworld_scraper-V-1.9\aniworld_scraper-main\src\logic\downloader.py", line 49, in download_and_convert_hls_stream
>     subprocess.run(ffmpeg_cmd, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
>   File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 548, in run
>     with Popen(*popenargs, **kwargs) as process:
>          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 1026, in __init__
>     self._execute_child(args, executable, preexec_fn, close_fds,
>   File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 1538, in _execute_child
>     hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
>                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> FileNotFoundError: [WinError 2] The system cannot find the file specified
> Press any key to continue . . .
wolfswolke commented 10 months ago

@BarbokOL you are missing FFMPEG subprocess.run(ffmpeg_cmd, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

BarbokOL commented 10 months ago

@BarbokOL you are missing FFMPEG subprocess.run(ffmpeg_cmd, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Could I have a wrong version of some sort, I do I have it on my system and even in the src folder after manually downloading it again. image_2023-12-28_215833774

Bramdarl commented 10 months ago

@BarbokOL you are missing FFMPEG subprocess.run(ffmpeg_cmd, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Could I have a wrong version of some sort, I do I have it on my system and even in the src folder after manually downloading it again.

try to add ffmpeg to windows systemvariables following this guide (step 3 and 4): https://phoenixnap.com/kb/ffmpeg-windows

wolfswolke commented 10 months ago

@BarbokOL move FFMPEG to the ROOT of the Project not the SRC

BarbokOL commented 10 months ago

@BarbokOL you are missing FFMPEG subprocess.run(ffmpeg_cmd, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Could I have a wrong version of some sort, I do I have it on my system and even in the src folder after manually downloading it again.

try to add ffmpeg to windows systemvariables following this guide (step 3 and 4): https://phoenixnap.com/kb/ffmpeg-windows

That did it for me, thank you two very much!