flowhella / get-flash-videos

Automatically exported from code.google.com/p/get-flash-videos
0 stars 0 forks source link

support for crunchyroll.com #286

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I've managed to add support for crunchyroll (with subtitles).
Here's my FlashVideo/Site/Crunchyroll.pm file:

Requires Crypt::Rijndael, Digest::SHA1, and Compress::Zlib.

Feel free to clean up and use.

If you have an account, add an entry to ~/.netrc such as
machine crunchyroll
  login   username
  password mypassword

Original issue reported on code.google.com by zeddor...@gmail.com on 26 Jul 2011 at 9:05

Attachments:

GoogleCodeExporter commented 8 years ago
Hey could you add a one-line example?  *it could just be me though* but I'm 
having difficulty figuring it out.

Tnx

Original comment by jason.cl...@gmail.com on 15 Aug 2011 at 3:08

GoogleCodeExporter commented 8 years ago
One line is kinda hard.  I have my ~/.netrc file containing the three lines:
"machine crunchyroll
  login myusername
  password mysecretpassword"
You will need to run "chmod 600 ~/.netrc" or it will refuse to read the file.
Then use "get-flash-video --subtitles $URL" (replace $URL with the url of the 
page that you want to download from.. such as 
http://www.crunchyroll.com/usagi-drop/episode-1-the-bellflower-girl-580582 for 
the first ep of usagi drop.  I would have used Blue Exorcist for the example, 
except for the fact that it's hard subbed--nosubtitles to download and decrypt).

I've updated the file a bit (new version will create subdirectory such as 
"blue-exorcist" and put the downloaded file in there, and the new version saves 
the browser cookies after logging in so it doesn't have to log in each and 
every time).  Also some error checking added (such as the case that the video 
is hard subbed and doesn't have a separate subtitle file).  See attachment for 
new version.

Odd thing:  Some subtitles actually have COMMENTS in them that don't show up in 
the flash player, but are showing up here.  Comments are embedded in { } 
characters.  VLC will show the comments as part of the subtitles.   Not all 
shows have soft subs.

Original comment by zeddor...@gmail.com on 15 Aug 2011 at 4:02

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks.  For some reason I think I'm still doing something wrong I believe.  
Just to test it out I'm using: 

get_flash_videos $URL 
and it can't seem to find the URL.

It says:
Using method 'generic' for http://www.crunchyroll.com/..82

Then it seems to try and 'guess' the video url.  It suddenly jumps to twitter 
and it's like game-over.

I wish I knew what I was doing wrong.
btw where are you putting the .netrc?  I just put it my home folder.

Thanks.

Original comment by jason.cl...@gmail.com on 15 Aug 2011 at 4:24

GoogleCodeExporter commented 8 years ago
It saying "Using method 'generic'" tells us that it's not finding the 
Crunchyroll.pm file.

Where did you put it?  (it should be in /usr/share/perl5/FlashVideo/Site/)

Otherwise, you would need to cut and paste the entire file into your 
get_flash_video file itself. (you can insert it right into the the very 
beginning of the file)

(yes, the .netrc should be in your home folder)

Original comment by zeddor...@gmail.com on 16 Aug 2011 at 1:44

GoogleCodeExporter commented 8 years ago
lol. weird.  I was just typing this up.
It looks like it's here: (home folder)/.get_flash_videos/plugins/Crunchyroll.pm

I added it using the --add-plugin.  Should I copy it manually?

Here's a snippet of the debug output:
1 plugin installed:
- Crunchyroll.pm
Downloading http://www.crunchyroll.com/...82
-> GET http://www.crunchyroll.com/...82
<- 200 text/html (117927): UTF8 on, non-ASCII, 117927 characters 117965 bytes
Trying to open plugin ~/.get_flash_videos/plugins/Www.pm
Trying to open plugin ~/.get_flash_videos/plugins/Crunchyroll.pm
Trying to open plugin ~/.get_flash_videos/plugins/Com.pm
...
Using method 'generic' for http://www.crunchyroll.com/...82

Original comment by jason.cl...@gmail.com on 16 Aug 2011 at 1:58

GoogleCodeExporter commented 8 years ago
hmmm I have other issues it seems.  just tried a youtube vid and got a:

Using method 'youtube' for http://www.youtube.com/watch?v=9AHX39zr3qs
Unable to find video URL

I'll debug that and get back to this.

Original comment by jason.cl...@gmail.com on 16 Aug 2011 at 2:14

GoogleCodeExporter commented 8 years ago
(Interesting, I wish I knew about the --add-plugin command earlier...)
Yes, --add-plugin works and is a correct way of adding a plugin.  (I verified 
this on my system)

Here's debug output from my system:  (not sure why yours isn't doing it right)

1 plugin installed:
- Crunchyroll.pm
Downloading http://www.crunchyroll.com/...82
-> GET http://www.crunchyroll.com/...82
<- 404 text/html (12728): UTF8 on, non-ASCII, 12728 characters 12742 bytes
Couldn't download 'http://www.crunchyroll.com/...82': 404 Not Found
Trying to open plugin ~/.get_flash_videos/plugins/Www.pm
Trying to open plugin ~/.get_flash_videos/plugins/Crunchyroll.pm
Using method 'crunchyroll' for http://www.crunchyroll.com/...82

Notice that it doesn't attempt to load Com.pm--it indicates that loading 
Crunchyroll.pm worked.  On your debug output it attempts Com.pm.  No idea 
what's causing this.

The youtube plugin doesn't work for me either.. it says
Unable to find video URL
YouTube: Subscribed

Original comment by zeddor...@gmail.com on 16 Aug 2011 at 8:23

GoogleCodeExporter commented 8 years ago
I can't get this to work with login. Downloading sd videos partialy works but 
it fails to get the subtitles (or isn't displaying them). Please fix I hate 
using flash on linux and this would be great.

Original comment by cheesebo...@gmail.com on 16 Apr 2012 at 2:44

GoogleCodeExporter commented 8 years ago
Unfortunatly, Crunchyroll "fixed" their server in such a way that this will no 
longer work correctly.  (Ok, it will EVENTUALLY work if you keep re-executing 
the command until you get to 100%; it downloads for a few minutes then stops)

Even when downloading SD videos, it should still create a "*.srt" file with the 
subtitles--but to download with login, a .netrc file is REQUIRED, and it must 
contain your crunchyroll username and password (case sensitive, with the second 
and third lines beginning with a "tab" character) and the file must be owned by 
the user running the script, and must be chmodded to 0600.  It will download in 
whatever resolution your account is set for as the default resolution (normally 
the 720p stream).

Original comment by zeddor...@gmail.com on 17 Apr 2012 at 3:19

GoogleCodeExporter commented 8 years ago
Crunchyroll has changed the interaction format over time. I've been updating 
for my personal use. Please find attached an updated version. The GET request 
was changed to a POST request with the "current_page" value set properly. 
Additionally, the regex to match the config_url was modified as that content is 
now stored as json in the HTML page.

Still suffers from inability to get to 100%. I had a bash script that checked 
the exit code and would repeat the command until it got there. I'll post that 
whenever I can find it.

TODO: use cookie jar so we're not posting to /login with each request (no doubt 
that looks suspicious).

Original comment by rasche.e...@gmail.com on 30 May 2013 at 7:46

Attachments: