Coder Social home page Coder Social logo

pystardust / ani-cli Goto Github PK

View Code? Open in Web Editor NEW
6.7K 6.7K 506.0 11.33 MB

A cli tool to browse and play anime

License: GNU General Public License v3.0

Shell 79.41% Roff 18.14% Nix 2.45%
anime cli fzf linux mac posix rofi shell steamdeck syncplay terminal termux webscraping windows

ani-cli's People

Contributors

3ricsonn avatar 71zenith avatar baaboe avatar candrapersada avatar carlosloboxyz avatar coolnsx avatar derisis13 avatar dink4n avatar drabart avatar duncanjake1 avatar freezboltz avatar humanman007 avatar justchokingaround avatar kernelwernel avatar kungger-git avatar lockl00p avatar lukasz825700516 avatar malertach avatar medanisjbara avatar metafates avatar meteor314 avatar nannk avatar nasseef20 avatar port19x avatar pystardust avatar raynardgerraldo avatar rendevior avatar truboxl avatar werdahias avatar wiener234 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  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

ani-cli's Issues

403 Forbidden on www01.anicdn.stream because of missing header

Hello,
I think gogoanime.vc added some checks to verify the origin of the requests using the Referer header
this can easily bypassed by hard-coding the required header value

I edited the line 209 and now it's working fine

setsid -f $player_fn --http-header-fields='Referer: https://streamani.io/' "$video_url" >/dev/null 2>&1

wayland support?

works great in x11, but crashes in wayland. not sure if it's an easy fix or impossible, just curious if it will be supported.

by crashes, I mean mpv briefly comes up then closes. I'm assuming it's not getting the information needed to pull a video.

Continue download if failed abruptly

Youtube-dl has the ability to continue downloading from the same point if it fails abruptly. ani-cli currently does not support this, i.e. if my download is at 50% and I kill it and set it to download again, it does not continue from 50% but from 0%.

It would be nice if this support is added to it. :-)

Subbed links are currently not working

All of the links for subbed episodes are down, only the dubbed episodes are working. The browser opens up instead saying 'unable to connect'
Not sure if this is a temporary issue or a permanent problem with the domain we are scraping.
Will close this issue if links reopen

Downloaded videos not working

When I download anime episodes using ani-cli -d <query> it actually downloads the episodes but when I try to open them, it doesn't work. It says "text/html decoder is required to play the file, but is not installed". Is there a missing dependency that I have to install?

0

edit: I use Ubuntu 20.04 LTS. When I tried opening one of the downloaded episodes using a text editor, I got this:
1

Stopped working all of a sudden

Scrapes and gives me options to choose from. After I choose the episode numbers, it says "Currently playing", but nothing else happens. The internet usage during this time is zero. Only spikes up during "Getting data for episode"

Update: I tried downloading an episode and the below text was the output

$ anime -d
Search Anime: dr. stone
[1] dr-stone
[2] dr-stone-dub
[3] dr-stone-stone-wars
[4] dr-stone-stone-wars-dub
[5] dr-stone-stone-wars-kaisen-zenya-special-eizou
Enter number: 2
Range of episodes can be specified: start_number end_number
Choose episode [1-24]: 1
Getting data for episode 1
Downloading episode 1 ...

curl: (3) URL using bad/illegal format or missing URL
Download failed episode: 001

mpv not opening

I can search for shows just fine, but when I try to play an episode it doesn't open. When I try to download an episode the mp4 file data reads as follows:

<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>

I already implemented @Almo7aya 's fix to bypass gogoanime's checks from a week ago, but this didn't change anything.

Add more anime streaming services

Since gogoanime is blocked in many regions, i suggest adding new anime streaming services like animixplay.to etc. to keep it going even if one of the sites is blocked in the specific region.

Thank you!

Quality control of anime

The possibility of streaming anime in 720p or 1080p would be awesome from within ani-cli, what is your main focus for now?

.cache/ani-hsts: No such file or directory

I went through the process on Windows, installing vlc and git clone the ani-cli-win branch although I couldn't run the "make" command. It worked although when playing the video it doesn't show the menu option and also show the No such file or directory message, couldn't scrub the video either.

Smart TV

Not sure of this is possible, but can we attempt this on a smart TV? I have a Samsung with GooglePlay store and downloaded Termux. There I installed the dependencies and cloned the repo. I was able to get everything working but when playing only the audio is heard and the video doesn't seem to appear. I'm assuming because normally the application opens another terminal or splits the current one but doesn't seem to work on Smart TV. Any ideas on what we could do here?

Not Downloading episodes

When I run ani-cli -d and then go through the rest of the process, it almost immediately says Downloaded, but when I open the downloaded file, it's blank.

Program "vlc" not found. Please install it.

How can I fix this issue? I have VLC installed in this path C:\Program Files\VLC\vlc.exe.

Win10@DESKTOP------- MINGW64 ~/ani-cli (windows-vlc) $ ./ani-cli-win Program "vlc" not found. Please install it.

[Feature request] Add option to batch download

Hi!

Wonderful script to stream and download anime. Currently the script supports downloading only one episode at a time. It would be great if a batch download option would be available. For example to download episodes 1 to 10

ani-cli -d shingeki no kyojin --episodes 1:10 

I think this would be a great feature welcomed by everyone. Keep up the good work!

Default download path

I ran in to the problem that i wanted to download the anime but the mkv files are saved in /home/$user/

I want them saved in my anime directory /home/$user/etc/media/anime/

Is this possible?

Resuming with ani-cli

I tried to resume something that I was watching by using -H. ani-cli would give me a list of options, but when I selected something, this happened:
[1] kirby-righ-back-at-ya [2] sonichehedgehog Enter number: Invalid number entered

FR / Things.....

K so don't know if this is the correct place to put this. But I thought I might be able to make a request or find out that I'm dumb and it already does what I want....XD

maybe the error:

When I use the -d tag to download an episode outside of the ani-cli directory by doing ani-cli -d "URL"  it does
  1. Have me put in the number of the series/episode I want.
  2. Says downloading episode .....
  3. Takes about 2 seconds and then reports the download as complete
  Issue: The download is not "complete" or readable. 

Yes I did the add the two lines thing for FFmpeg, double-checked, and that is what allowed the next section to work at all.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Maybe the FR

After adding the lines for ffmpeg the following started to work.....ish.

When I do the same thing from inside the ani-cli directory by doing ./ani-cli -d "URL" It
  1. Has me put in the number of the series/episode I want.
  2. Says downloading episode.....
  3. Shows no further status update. 
 FR: Show a download indicator or inform me that I am doing something wrong XD.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Just a suggestion
Put a few screenshots up on the made page so we have an idea of how it's supposed to look. I don't know about everyone but I know that at least a few people like me would benefit greatly from having a visual cue/ reference to see what we are doing.

If I am just the big dumb and all of this stuff is already addressed/done somewhere else then feel free to give the rere headstamp and send me on my way. <3

EDIT: FR: Support for external downloaders like aria2c or....something.

[Feature Request] Ability to change Video Quality in Streams and Downloads

Is it possible to have the ability to change the video quality of the anime? I'm pretty sure Gogoanime has a Multiquality Server that lets you pick what quality to choose when watching. Currently ani-cli just defaults to 1080p/720p which I don't really use because streaming it is slow and sometimes get tearing/artifacting issues, and it uses lots of disk space to download. I always go for the Multiquality Server on Gogoanime to manually choose 360p when streaming or downloading. Please consider having the option to choose video quality if Possible.

[Feature Request] More sites to scrap

Right now the script scraps gogoanime's website, but I find quite often that the quality is very low (Lets say My Neighbor Totoro) in comparison to other streaming websites (like 9anime.to).
I know that adding another website option might be basically like writing another script, so take this suggestion as something in late future.
Love your work, keep it up!

Not working

Irrespective of what search query I put, it shows 'no search results'. Also, on entering no search query, I get 'no search result'.

Is there a problem with the script or any reason why it is happening?

[Feature Request] Downloading multiple episodes in parallel?

Is it possible to have an option about how many episodes I want to download at the same time?
For example, if I was downloading 6 episodes, I can have 3 episodes downloading in parallel instead of just downloading one episode at a time.
I have no experience in programming shell scripts so I don't know if this feature is even possible but if it is, it might really speed up download times.

Possible incompatibility with Item or Mac OS X

First, off this the last thing I would have expected in a bash script and I love it XD

Second, In Item on OSX, I do no get a video window when playing an episode as you demonstrated in your Reddit post. Is there any dependency not listed in your read me?

Suggestion: Alter quality

Seen as I see different video qualities it would be good to have an option to choose what is the best quality it offers on the anime, possibly with just inputting in the arguments:

ani-cli best* Anime

Always getting the best stream avalible. This can be done alternativly with worsed or have a number system protentualy depending on the connection for if you are on a slow connection temporarily for example.
A config file could also be used to save typing it out every time. Much for how the -H works. But can be easily be over written if the argument is passed if you are on a slow network for a short amount of time, like a coffee show.

Selection for Particular Resolution

It would be amazing if you add a Resolution selector in the Script. So Everyone can actually Play whichever resolution they want.
It Is Still amazing and Very Structured . Love you Work btw,Keep Scripting ๐Ÿ‘๐Ÿผ :)

Tried changing mpv with vlc but still not working

I tried to change it with vlc instead on mpv but the script was not working

#!/bin/sh

# dependencies: grep sed curl video_player
# video_player ( needs to be able to play urls )
player_fn="vlc"

prog="ani-cli"
logfile="${XDG_CACHE_HOME:-$HOME/.cache}/ani-hsts"

c_red="\033[1;31m"
c_green="\033[1;32m"
c_yellow="\033[1;33m"

mpv not opening

cli shows that the anime is currently playing, but didnt open mpv at all, i do not know if this is a windows only problem or what

[Windows-vlc] Scrubbing stops episodes entirely

While watching any episode, with a stable quality and connection, letting episodes play from start to finish is no problem at all, but scrubbing back or forward stops any episode from playing again until VLC is closed and an episode is selected again, or at least, the amount of time on which the episode could start playing again is way inconvenient and not acceptable at all.

Controls Not showing up after playing

After i search an anime and picked episode then play it the controls are not showing up, it only says getting data for episode one but it won't show the other commands, i use the windows version.

Video player arguments

This is a pretty fringe case, but I'm using an all tty system with framebuffer, and calling mpv on my system doesn't exactly work without adding the argument "--vo=drm".

I've been handling this issue on my own by making a few changes:

5a6
> player_args="--vo=drm"
207c208
<    setsid -f $player_fn "$video_url" >/dev/null 2>&1
---
>    setsid -f $player_fn $player_args "$video_url" >/dev/null 2>&1

I realize that making a commit like this would likely break the script for more people than it would help, but in general adding a feature that allows specification of video player arguments would be useful, since i have to make these changes myself every time the script gets updated.

program "vlc" not found. Please Install it

I have followed the procedure for the windows version and everything should be fine when I am attempting to query an anime and that error pops out. However, I have already downloaded vlc application and put it on the environment path, I even restarts my device just to make sure after I put VLC to my environment device. Yet, I still get that error. How to fix this?

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.