anime-dl / anime-downloader

A simple but powerful anime downloader and streamer.
The Unlicense
1.93k stars 218 forks source link

kissanimex: Possibe bug in episode scraper #712

Open IngwiePhoenix opened 3 years ago

IngwiePhoenix commented 3 years ago

Describe the bug Long story short: I wanted to watch an episode of JoJo's Bizzare Adventure via kissanimex but was met with the message that no video could be found. Which is wrong, considering that I can watch it just fine via the website.

Turns out that there might be a problem in the episode scraping.

I found the validation to this assumption when executing this in the JS console: document.querySelectorAll("div.host#menu > a").forEach(x => console.log(x.dataset)).

To reproduce

anime -ll DEBUG dl -d "https://kissanimex.com/anime/6021-jojo-no-kimyou-na-bouken"
LOG ``` 2021-08-27 17:58:08 ingwie-w10 anime_downloader.util[48732] INFO anime-downloader 5.0.14 2021-08-27 17:58:08 ingwie-w10 anime_downloader.util[48732] DEBUG Platform: Windows-10-10.0.19043-SP0 2021-08-27 17:58:08 ingwie-w10 anime_downloader.util[48732] DEBUG Python 3.9.5 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] INFO Extracting episode info from page 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG GET https://kissanimex.com/anime/6021-jojo-no-kimyou-na-bouken 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.198 Safari/605.1.15'} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.session[48732] DEBUG cached request 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG https://kissanimex.com/anime/6021-jojo-no-kimyou-na-bouken 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG C:\Users\ingwi\AppData\Local\Temp\animedlk_sytv4o\tmplyqb258w 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG GET https://kissanimex.com/anime/6021-jojo-no-kimyou-na-bouken 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.198 Safari/605.1.15'} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.session[48732] DEBUG cached request 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG https://kissanimex.com/anime/6021-jojo-no-kimyou-na-bouken 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG C:\Users\ingwi\AppData\Local\Temp\animedlk_sytv4o\tmpgesz_osl 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] DEBUG EPISODE IDS: length: 6, ids: ['https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1', 'https://kissanimex.com/watch/dubbed/28709-jojo-no-kimyou-na-bouken-episode-2', 'https://kissanimex.com/watch/dubbed/28710-jojo-no-kimyou-na-bouken-episode-3', 'https://kissanimex.com/watch/dubbed/28711-jojo-no-kimyou-na-bouken-episode-4', 'https://kissanimex.com/watch/dubbed/28712-jojo-no-kimyou-na-bouken-episode-5', 'https://kissanimex.com/watch/dubbed/28713-jojo-no-kimyou-na-bouken-episode-6'] 2021-08-27 17:58:08 ingwie-w10 anime_downloader.commands.dl[48732] INFO Found anime: JoJo no Kimyou na Bouken 2021-08-27 17:58:08 ingwie-w10 anime_downloader.commands.dl[48732] INFO Downloading to C:\Users\ingwi\anime 2021-08-27 17:58:08 ingwie-w10 anime_downloader.commands.dl[48732] INFO Speed is being limited to 0 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] DEBUG Extracting stream info of id: https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG GET https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.198 Safari/605.1.15'} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.session[48732] DEBUG cached request 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG C:\Users\ingwi\AppData\Local\Temp\animedlk_sytv4o\tmpsdux8n_0 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] DEBUG Sources : 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG GET https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.198 Safari/605.1.15'} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.session[48732] DEBUG cached request 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG C:\Users\ingwi\AppData\Local\Temp\animedlk_sytv4o\tmpvcgjg00t 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] DEBUG Sources : 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] WARNING Quality 1080p not found. Trying 720p. 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG GET https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.198 Safari/605.1.15'} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.session[48732] DEBUG cached request 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG C:\Users\ingwi\AppData\Local\Temp\animedlk_sytv4o\tmp8syjnliy 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] DEBUG Sources : 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG GET https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.198 Safari/605.1.15'} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.session[48732] DEBUG cached request 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG C:\Users\ingwi\AppData\Local\Temp\animedlk_sytv4o\tmp3_9bo4qy 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] DEBUG Sources : 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] WARNING Quality 720p not found. Trying 480p. 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG GET https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.198 Safari/605.1.15'} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.session[48732] DEBUG cached request 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG C:\Users\ingwi\AppData\Local\Temp\animedlk_sytv4o\tmpzzc0o59f 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] DEBUG Sources : 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG GET https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.198 Safari/605.1.15'} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.session[48732] DEBUG cached request 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG C:\Users\ingwi\AppData\Local\Temp\animedlk_sytv4o\tmpqm04qjfv 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] DEBUG Sources : 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] WARNING Quality 480p not found. Trying 360p. 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG GET https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.198 Safari/605.1.15'} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.session[48732] DEBUG cached request 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG C:\Users\ingwi\AppData\Local\Temp\animedlk_sytv4o\tmpzfak9t1_ 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] DEBUG Sources : 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG GET https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.198 Safari/605.1.15'} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.session[48732] DEBUG cached request 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG C:\Users\ingwi\AppData\Local\Temp\animedlk_sytv4o\tmpua7c2ir1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] DEBUG Sources : 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] WARNING Skipping episode: 1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.util[48732] DEBUG cmd: {aria2} DEBUG:anime_downloader.util:cmd: {aria2} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.util[48732] DEBUG episode: DEBUG:anime_downloader.util:episode: 2021-08-27 17:58:08 ingwie-w10 anime_downloader.util[48732] DEBUG file format: {anime_title}/{anime_title}_{ep_no} DEBUG:anime_downloader.util:file format: {anime_title}/{anime_title}_{ep_no} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- DEBUG:anime_downloader.sites.helpers.request:----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG GET https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 DEBUG:anime_downloader.sites.helpers.request:GET https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {} DEBUG:anime_downloader.sites.helpers.request:{} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.198 Safari/605.1.15'} DEBUG:anime_downloader.sites.helpers.request:{'user-agent': 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.198 Safari/605.1.15'} 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG ----- DEBUG:anime_downloader.sites.helpers.request:----- 2021-08-27 17:58:08 ingwie-w10 anime_downloader.session[48732] DEBUG cached request DEBUG:anime_downloader.session:cached request 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 DEBUG:anime_downloader.sites.helpers.request:https://kissanimex.com/watch/dubbed/28708-jojo-no-kimyou-na-bouken-episode-1 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.helpers.request[48732] DEBUG C:\Users\ingwi\AppData\Local\Temp\animedlk_sytv4o\tmp6qcxqsei DEBUG:anime_downloader.sites.helpers.request:C:\Users\ingwi\AppData\Local\Temp\animedlk_sytv4o\tmp6qcxqsei 2021-08-27 17:58:08 ingwie-w10 anime_downloader.sites.anime[48732] DEBUG Sources : DEBUG:anime_downloader.sites.anime:Sources : Traceback (most recent call last): File "c:\python39\lib\site-packages\anime_downloader\sites\anime.py", line 342, in source sitename, url = self._sources[index] IndexError: string index out of range During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Python39\Scripts\anime-script.py", line 33, in sys.exit(load_entry_point('anime-downloader==5.0.14', 'console_scripts', 'anime')()) File "c:\python39\lib\site-packages\anime_downloader\cli.py", line 81, in main cli() File "c:\python39\lib\site-packages\click\core.py", line 1137, in __call__ return self.main(*args, **kwargs) File "c:\python39\lib\site-packages\click\core.py", line 1062, in main rv = self.invoke(ctx) File "c:\python39\lib\site-packages\click\core.py", line 1668, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "c:\python39\lib\site-packages\click\core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "c:\python39\lib\site-packages\click\core.py", line 763, in invoke return __callback(*args, **kwargs) File "c:\python39\lib\site-packages\click\decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "c:\python39\lib\site-packages\anime_downloader\commands\dl.py", line 160, in command util.external_download(external_downloader, episode, File "c:\python39\lib\site-packages\anime_downloader\util.py", line 393, in external_download cmd = format_command(cmd, episode, file_format, speed_limit, path=path) File "c:\python39\lib\site-packages\anime_downloader\util.py", line 294, in format_command if not Config._CONFIG['dl']['aria2c_for_torrents'] and (episode.url.startswith('magnet:?xt=urn:btih:') or episode.source().stream_url.startswith('https://magnet:?xt=urn:btih:')): File "c:\python39\lib\site-packages\anime_downloader\sites\anime.py", line 346, in source raise NotFoundError("No episode sources found.") anime_downloader.sites.exceptions.NotFoundError: No episode sources found. ```