Sure.
So what I did was just use a decryption algorithm that I stumbled across on google. All the credit belongs to the author of this code and its related libraries:
http://xbmc-addon-repository.googlec.../crunchyDec.py . The author's xbmc-addon-repository project has all this other code which looks like it's used to pull the video and subtitle files from crunchyroll as well. I didn't use nor will I refer to any of it since it's already well-established on these forums on how to pull those files.
Since it was written in python I wrote a script in python (my first one, hehe) to invoke crunchyDec.py. All the decryption code is by the original author. My only contribution is decode.py which is very crude and basic.
A .zip file containing all the code is available here:
http://tron.orconhosting.net.nz/crun...ml_decoder.zip
You will need python installed on your computer to run the script. I use Windows 7 64-bit so I installed the "Python 2.7.2 Windows X86-64 Installer" (from
http://python.org/download/). The correct installation and configuration of python is beyond the scope of what I'll cover.
The steps below work as at 2011-08-27 07:30am NZT
Once you've got python set up, to run the script with python:
- Extract the contents of the zip file into any folder.
- Open a windows command prompt and change the directory (cd) to the folder containing the unzipped files.
The easiest way to do this in Win7/Vista is to open the folder, click on the "address bar" and type "cmd" (without the quotes) and press enter. This should open a command prompt in the right directory/folder. - Type in: python decode.py input.xml output.ass
and press enter to start the script.
"input.xml" is a required parameter; it is the name of your xml file containing the encrypted subtitles.
"output.ass" is a required parameter; it is the name of the .ass subtitle file to be created.
If you don't know your way around windows command prompt make sure none of your file names contain spaces. - If everything executes correctly the command prompt should display
Code:
[your unzipped folder location]>python decode.py sample.xml sample.ass
CRUNCHYROLL: --> Attempting to decrypt subtitles...
CRUNCHYROLL: --> Success! Subtitles decrypted.
and you should have a new .ass file in the same folder.
Notes: i) The script contains no error checking or handling whatsoever. If you get errors or are otherwise unable to successfully decrypt the xml file it likely means you didn't provide the correct parameters, or crunchyroll has changed their encryption algorithm.
ii) So long as the keepvid method works I don't intend on making any changes/improvements to this script.
Here are the steps to download the raw (encrypted) xml subtitle files.
- Find the id number of the subtitle file for your video. I know of at least 3 methods
- Following Steven's method to grep the plugin-container.exe dump: http://stream-recorder.com/forum/use...ows-t8808.html . Grep for /xml/ and that should show you the id number somewhere.
- When playing the video from crunchyroll right-click on the video. The subtitle id will be number next to the name of the subtitle track, but less one. E.g. if the subtitle track is "[57051] English", then the id is 57050.
- Display the page source of the page with the video and look for something like this:
HTML Code:
<div>Subtitles: <span><img src="http://static.lln.crunchyroll.com/i/country_flags/us.gif" /> <a href="/naruto-shippuden/episode-225-the-cursed-ghost-ship-580904?ssid=57050" title="English (US)">English (US)</a></span></div>
The 'ssid=57050' part tells you the id is 57050.
- Download the xml file at this url: http://www.crunchyroll.com/xml/?req=...tle_script_id=idNumberHere
where idNumberHere is the id number you found above.
In my example I would have used http://www.crunchyroll.com/xml/?req=...ipt_id=5705 0
Note: I have only tested these steps with the Bleach series on crunchyroll but I assume all non-member videos use the same structure.
I hope that helps and that I haven't left out anything obvious.
Thanks,
tRon