Open CZeil opened 2 years ago
This show doesn't have a player page. It looks like Funimation want to move away from using the player page and start relying solely on apis.
''' Extract the episode, season and show objects given either episode/experience id '''
show = self._parse_json(
self._search_regex(
r'show\s*=\s*({.+?})\s*;', webpage, 'show data', fatal=fatal),
experience_id, transform_source=js_to_json, fatal=fatal) or []
for season in show.get('seasons', []):
for episode in season.get('episodes', []):
if episode_id is not None:
if str(episode.get('episodePk')) == episode_id:
return episode, season, show
continue
for _, _, f in self._get_experiences(episode):
if f.get('experienceId') == experience_id:
return episode, season, show
if fatal:
raise ExtractorError('Unable to find episode information')
else:
self.report_warning('Unable to find episode information')
return {}, {}, {}
Pretty sure this can all be done better using the apis anyway.
This show doesn't have a player page. It looks like Funimation want to move away from using the player page and start relying solely on apis.
''' Extract the episode, season and show objects given either episode/experience id ''' show = self._parse_json( self._search_regex( r'show\s*=\s*({.+?})\s*;', webpage, 'show data', fatal=fatal), experience_id, transform_source=js_to_json, fatal=fatal) or [] for season in show.get('seasons', []): for episode in season.get('episodes', []): if episode_id is not None: if str(episode.get('episodePk')) == episode_id: return episode, season, show continue for _, _, f in self._get_experiences(episode): if f.get('experienceId') == experience_id: return episode, season, show if fatal: raise ExtractorError('Unable to find episode information') else: self.report_warning('Unable to find episode information') return {}, {}, {}
Pretty sure this can all be done better using the apis anyway.
But I found it strange because the chapters of the second season are the problem, the first season I can download normally.
Can we fix this error on our end or do we need to wait for an update?
Can we fix this error on our end or do we need to wait for an update?
I imagine that if you have knowledge of python and know how to solve the problem there is no problem.
You can get all the information needed using the api: https://prod-api-funimationnow.dadcdigital.com/api/source/catalog/episode/the-daily-life-of-the-immortal-king/wang-ling-wants-to-lead-a-quiet-life/
But I'm no good doing this stuff, I might give it a shot I guess but even if I get it working it would only be a workaround, someone experienced would need to do it.
EDIT: Nvm... it's too much for me to do :(
i can explain how funimation works right now but i can not write anything in python so i can not fix the issue.
i don't know where Jules got that API url from but the desktop api url for a single episode is https://d33et77evd9bgg.cloudfront.net/data/v1/episodes/[Title].json
In the case of the video above the [Title] would be replaced with the episode title that is inside the url wang-ling-wants-to-lead-a-quiet-life
this gives us a json file with a bunch of information of which we directly only need the id
which in this case would be TDI0016
, there are other usefull things like the title of the episode with a more readable way and we also get the season/episode numbers and the Anime title.
this gives us everything we need to properly save the file exept the video/subtitle files we want.
To get that url there is an second api that is either with it simple "anonymous usecase" https://playback.prd.funimationsvc.com/v1/play/anonymous/[id]?deviceType=web
or the advanced version https://playback.prd.funimationsvc.com/v1/play/[id]?deviceType=web
which requires an Authorization
http header with an Token
which is just the value of the src_token
cookie
The anonymous
works fine for all free episodes as long there are not locked behind the mature content
filter.
The second API repsond with an other json that contains all available streams and subtitles, which can depends on the location and account type.
Checklist
Region
US
Description
I was trying to see if the error was mostly mine but it seems to be a coding error, I think.
link: https://www.funimation.com/v/the-daily-life-of-the-immortal-king/wang-ling-wants-to-lead-a-quiet-life
Verbose log