CloudMax94 / crunchyroll-cli

8 stars 2 forks source link

change in Crunchyroll page #5

Closed alzamer2 closed 4 years ago

alzamer2 commented 5 years ago

hi long time no see

while i was fixing my code i checked out the resent page of Crunchyroll it seem they no longer use complex way to get data of the episode or more like they added it to the php code of the page so when the html page load up it contains them directly if you looked for "vilos.config.media = " in the source code of the html page you will get dict that contains:

  1. hls links for raw ("audio_lang":"jaJP","hardsub_lang":null)
  2. hls links for dubed anime
  3. subtitles links that already decoded and be directly download

no idea why did they do that, maybe its only temp change or mabe they dont care or even maybe they wanted to reduce the memery and time for vido to load

hope this info will be helpfull

CloudMax94 commented 4 years ago

Updated the CLI today to work with changes made to the website & their API. I do not want to rely on having to crawl the website since things might break pretty easily when they make changes to the site

However, they have seemingly changed how they encode the subtitles since the codebase doesn't seem to be able to decode subtitles anymore. For now I've changed the code to crawl the episode page and grab the subtitle data from vilos.config.media, as the subtitle files provided there are in plaintext.