Giter Club home page Giter Club logo

anirip's Introduction

anirip
Go Report Card GoDoc

anirip command

anirip is a Crunchyroll episode/subtitle ripper written in Go. It performs all actions associated with downloading video segments, subtitle files, and metadata and muxes them together appropriately.

Getting Started

Installing

1) Install ffmpeg if it doesn't already exist on your system. We will using this tool primarily for dumping episode content and editing video metadata.

2) Install Go and run go get. This installs the anirip binary on your local system.

$ go get github.com/s32x/anirip

If you did already installed the binary before and want to update - add the -u parameter:

$ go get -u github.com/s32x/anirip

Usage

To download shows from Crunchyroll :

anirip --help
anirip myUsername0123 myPassword5535 http://www.crunchyroll.com/strike-the-blood

Disclaimer

This repo/project was written as an educational intro to web-scraping and network analysis. It is provided publicly as a an open source project for nothing other than educational purposes. I do not take responsibility for how you use this software nor do I recommend you use it in any way that may infringe on Crunchyroll as a business.

Legal Warning

This application is not endorsed or affiliated with any anime stream provider. The usage of this application enables episodes to be downloaded for offline convenience which may be forbidden by law in your country. Usage of this application may also cause a violation of the agreed Terms of Service between you and the stream provider. A tool is not responsible for your actions; please make an informed decision prior to using this application. Any Stream decryption is done by a third party program, in the case of Crunchyroll by ffmpeg. Usage of third party programs and/or libraries may be forbidden in your country without proper consent of the copyright holder.

The MIT License (MIT)

Copyright © 2022 s32x

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

anirip's People

Contributors

ckolivas avatar s32x avatar theclickman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anirip's Issues

Can't get logged in anymore

When I try to log in with an actual premium account, I get this
[anirip] Error: Failed to verify session
The account works fine when I enter to the page, idk why I cant get logged anymore
I mean, it was fine like in 2 - 3 weeks ago, now suddenly I'm having this trouble ;/

Also I re installed my OS then tried again, but it didn't work

Error on raspberry pi

[anirip] Logging into Crunchyroll...
[anirip] Successfully logged in!
[anirip] Scraping show metadata...
[anirip] Error: There was an error retrieving show page - Get Haganai: unsupported protocol scheme ""

I traced this through the files to
main.go line 99: show.Scrape(client, showURL)
--> crunchyroll/show.go line 22 client.Get(showURL, nil)

where client = common.NewHTTPClient() and showURL = Haganai

Typo

There's a typo. After downloading a series, it says "Completed downloading episodes form [Series Name]". It should say from, not form.

All videos have the same episode number

I'm trying to download a complete season, but all the episodes have the same number, it's a little issue that makes harder how to identify the correct order, the name is ok, just the number. All episodes have the following format: serie name - S01E00 - episode name.

Any suggestions on how to fix this?

Exit Status 1

Getting Exit Status 1 when trying to get any of the shows on Ubuntu.

anirip: command not found

I'm not sure what I'm doing wrong D:

I'm doing this in Terminal in Mac OS 10.13.1. I was able to install golang without problems and have the folder $home/go. The problem is after I clone the git, I do go get and go install and no errors appear but when I run a command with anirip, it says command not found. Anything else I can try?

Linux problem

Hi
I have a problem on linux. every thing compile without problem but when i try to rip a link nothing is downloaded, the folder of the anime is present but empty.

a4c4ec75608a8023db67d753cefc33c1

Can't change video quality

When attempting to use -q to assign quality the video still uses the default (which is the highest available). Judging by a quick look through the code I think this is because the quality isn't passed on to the download function properly

anirip fails to create an episode if the title is too long

Error message: [anirip] rename C:\Users[XusernameX]\AppData\Local\Temp\anirip\episode.mkv Do You Love Your Mom and Her Two-Hit Multi-Target Attacks\Season One\Do You Love Your Mom and Her Two-Hit Multi-Target Attacks - S01E04 - Kids Are Kids and Parents Are Parents (but Also Human Beings), and It Takes All Kinds, but They Get Through It Together, Right.mkv: The system cannot find the path specified.

I believe this error occurs because the episode title is too long for the file system to handle. If I manually attempt to create the file I get a length error.

Could you please add a check to try to handle this.
eg:
if title.length > X:
title = title.substring(0,x)

Obviously this would need to be done before checking if the file already exists to stop redownloads of renamed files.

Thank you for your time, I love your software

Subtitles broken

anirip no longer downloads subtitles. I have tried rebuilding the latest version of anirip, updating ffmpeg, and even updating Go, but nothing seems to work. It doesn't even throw an error, it still says

[anirip] Downloading subtitles...
[anirip] Merging subtitles into MKV container...
[anirip] Downloading and merging completed successfully!

like it was fine.

Subtitles change after first episode.

On testing this on a series with multiple language subtitles, I found the subtitles changed to Spanish after the first episode in English. I added a little debugging to see why that might be and found this:
[anirip] Downloading subtitles...en-US
[anirip] Downloaded subtitles...en
It appears the variable subLang loses the "-US" extension after the function call:
subLang, err = episode.DownloadSubtitles(client, subLang, tempDir)
which creates the problem.

Files not renaming

[anirip] rename H:\RWBY - The Beginning\anirip\episode.mkv RWBY VOLUME 1-3: The Beginning \Season One\RWBY VOLUME 1-3 The Beginning Japanese Dub - S01E01 - Untitled.mkv: The filename, directory name, or volume label syntax is incorrect.

Is there anything I can do to fix this?

TMPDIR fails when on separate partition

On linux when TMPDIR is mounted on a different partition it fails to move the file due to it being across partitions with the error:
[anirip] Error: rename /tmp/anirip/episode.mkv $newfilename.mkv: invalid cross-device link
Altering TMPDIR to a directory on the same partition helps as a workaround for now.

No http request

So when I tried using anirip it, I got the error validating session: could not verify session
So I tried figuring out what happened and when I looked into my outgoing HTTP requests with Fillder I saw that there never was a request so somehow the program failed sending a request. Not sure why it happens but I might look into it.

Failed to verify session

Every time I try to use this, I get error: failed to verify session.

I am using the .exe from the zip file.

[anirip] Error: validating session: could not verify session

Hi,

I tried to download some shows today and I keep getting the same message
[anirip] Error: validating session: could not verify session

Does this have anything to do with Cloudfare Protection? Because I heard that every other script is not working anymore.

Compile issue

Compiling I get this on Windows Server 2016 using latest GO available.
`
C:\Go\workspace>go get

github.com/sdwolfe32/anirip/anirip

src\github.com\sdwolfe32\anirip\anirip\interfaces.go:54: show.GetTitle undefined (type *Show is pointer to interface, not interface)
src\github.com\sdwolfe32\anirip\anirip\interfaces.go:55: show.GetSeasons undefined (type *Show is pointer to interface, not interface)
src\github.com\sdwolfe32\anirip\anirip\interfaces.go:58: show.GetTitle undefined (type *Show is pointer to interface, not interface)
src\github.com\sdwolfe32\anirip\anirip\interfaces.go:62: undefined: err
src\github.com\sdwolfe32\anirip\anirip\interfaces.go:62: undefined: quality
src\github.com\sdwolfe32\anirip\anirip\interfaces.go:62: undefined: session in session.GetCookies
src\github.com\sdwolfe32\anirip\anirip\interfaces.go:62: undefined: err
src\github.com\sdwolfe32\anirip\anirip\interfaces.go:63: undefined: err in err.Error
src\github.com\sdwolfe32\anirip\anirip\interfaces.go:68: undefined: err
src\github.com\sdwolfe32\anirip\anirip\interfaces.go:68: show.GetTitle undefined (type *Show is pointer to interface, not interface)
src\github.com\sdwolfe32\anirip\anirip\interfaces.go:68: too many errors
`

Error: Failed to verify session

I used it modifying the resolution of video, and it was functioning correct.
Could use it until recently, but suddenly it stopped working, showing the Error Message " Error: Failed to verify session". That happen even with the correct Username - Password, so i tried with it without changes in source code, but even happen this error.
If you have some solution, please reply.
*Sorry in my poor English X(

Chose a Episode and select Subtitles

Hey, i wanted to use this for personal use, but there are some things that are not ok for me.
The first would be that it downloads the whole anime. A setting to choose the Episode would be nice (like -e or something like that. Or just a place for that)

The last but not least thing are the subtitles. It would be nice to choose them or choose all (if this is possible).

If you could make this, i would be really greatful!

Vladimir

Unable to handle special characters on Windows

Due to the way windows works anirip/GO has issues dealing with reserved characters, as shown in log1.txt. I propose the affected characters should be stripped in order to enable the expected functionality on shows where Crunchyroll uses a reserved character in the name. The following characters (below) are from the page https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx under heading File and Directory Names, subheading Naming Conventions.

In practice the only character I've seen used is the ?(question mark), but I can't say they haven't used any of the other ones.

Reserved Characters
< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)

log1.txt

Select resolution

Thanks for your work, this is truly awesome. What would make it even better would be to be able to select 720p so I don't use my entire monthly internet cap in one day 😀 .

Also you should have a paypal donation link or something so people can thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.