Skip to content

KevCui/animepahe-dl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

animepahe-dl

Download anime videos from animepahe in terminal

Table of Contents

Dependency

How to use

Usage:
  ./animepahe-dl.sh [-a <anime name>] [-s <anime_slug>] [-e <episode_num1,num2,num3-num4...>] [-r <resolution>] [-t <num>] [-l] [-d]

Options:
  -a <name>               anime name
  -s <slug>               anime slug/uuid, can be found in $_ANIME_LIST_FILE
                          ignored when "-a" is enabled
  -e <num1,num3-num4...>  optional, episode number to download
                          multiple episode numbers seperated by ","
                          episode range using "-"
                          all episodes using "*"
  -r <resolution>         optional, specify resolution: "1080", "720"...
                          by default, the highest resolution is selected
  -o <language>           optional, specify audio language: "eng", "jpn"...
  -t <num>                optional, specify a positive integer as num of threads
  -l                      optional, show m3u8 playlist link without downloading videos
  -d                      enable debug mode
  -h | --help             display this help message

Example

  • Simply run script to search anime name and select the right one in fzf:
$ ./animepahe-dl.sh
<anime list in fzf>
...
  • Search anime by its name:
$ ./animepahe-dl.sh -a 'attack on titan'
<anime list in fzf>
  • By default, anime slug/uuid is stored in ./anime.list file. Be aware that the value of anime slug/uuid often changes, not permanent. Download "One Punch Man" season 2 episode 3:
$ ./animepahe-dl.sh -s 308f5756-6715-e404-998d-92f16b9d9858 -e 3
  • List "One Punch Man" season 2 all episodes:
$ ./animepahe-dl.sh -s 308f5756-6715-e404-998d-92f16b9d9858
[1] E1 2019-04-09 18:45:38
[2] E2 2019-04-16 17:54:48
[3] E3 2019-04-23 17:51:20
[4] E4 2019-04-30 17:51:37
[5] E5 2019-05-07 17:55:53
[6] E6 2019-05-14 17:52:04
[7] E7 2019-05-21 17:54:21
[8] E8 2019-05-28 22:51:16
[9] E9 2019-06-11 17:48:50
[10] E10 2019-06-18 17:50:25
[11] E11 2019-06-25 17:59:38
[12] E12 2019-07-02 18:01:11
  • Support batch downloads: list "One Punch Man" season 2 episode 2, 5, 6, 7:
$ ./animepahe-dl.sh -s 308f5756-6715-e404-998d-92f16b9d9858 -e 2,5,6,7
[INFO] Downloading Episode 2...
...
[INFO] Downloading Episode 5...
...
[INFO] Downloading Episode 6...
...
[INFO] Downloading Episode 7...
...

OR using episode range:

$ ./animepahe-dl.sh -s 308f5756-6715-e404-998d-92f16b9d9858 -e 2,5-7
[INFO] Downloading Episode 2...
...
[INFO] Downloading Episode 5...
...
[INFO] Downloading Episode 6...
...
[INFO] Downloading Episode 7...
...
  • Download all episodes using *:
$ ./animepahe-dl.sh -s 308f5756-6715-e404-998d-92f16b9d9858 -e '*'
[INFO] Downloading Episode 1...
...
[INFO] Downloading Episode 2...
...
[INFO] Downloading Episode 3...
...
  • Specify video resolution:
$ ./animepahe-dl.sh -a jujutsu -e 5 -r 360
[INFO] Select video resolution: 360
[INFO] Downloading Episode 5...
  • Specify audio language:
$ ./animepahe-dl.sh -a 'samurai 7' -e 1 -o eng
[INFO] Select audio language: eng
[INFO] Downloading Episode 1...
  • Enable parallel jobs to download faster:
$ ./animepahe-dl.sh -a jujutsu -e 1 -t 100

⚠️ Be aware that the parallel download feature can be sometimes unstable, depending on the server side throttling. But usually, it should be stable with a number of threads below 50.

  • Show only m3u8 playlist link, without downloading video file:
$ ./animepahe-dl.sh -s 308f5756-6715-e404-998d-92f16b9d9858 -e 5 -l
...

It's useful to toss m3u8 into media player and stream:

$ mpv --http-header-fields="Referer: https://kwik.cx/" "$(./animepahe-dl.sh -s 308f5756-6715-e404-998d-92f16b9d9858 -e 5 -l)"

Disclaimer

The purpose of this script is to download anime episodes in order to watch them later in case when Internet is not available. Please do NOT copy or distribute downloaded anime episodes to any third party. Watch them and delete them afterwards. Please use this script at your own responsibility.

You may like...

Don't like animepahe? Want an alternative?

Check out twistmoe-dl

Want to know when the new episode of your favorite anime will be released?

Check out this script tvdb-cli


Buy Me A Coffee