Skip to main content

animepahe-dl

Download anime from animepahe in your terminal.

Fixes the Unsupported URL: https://kwik.cx/... error that yt-dlp hits — instead of relying on yt-dlp, this tool cracks kwik.cx's obfuscated JavaScript via Node.js to extract the real m3u8 stream, then downloads it with ffmpeg.

Requirements

  • Python 3.10+
  • Node.js (any recent version)
  • ffmpeg

On Termux (Android):

pkg install nodejs ffmpeg

Install

pip install animepahe-dl

Usage

# Interactive (search + pick)
animepahe-dl

# Direct search
animepahe-dl -a "one punch man"

# Specific episode
animepahe-dl -a "one punch man" -e 1

# Episode range
animepahe-dl -a "one punch man" -e 1-5

# Multiple episodes
animepahe-dl -a "one punch man" -e 1,3,5

# All episodes at 720p
animepahe-dl -a "one punch man" -e "*" -r 720

# Custom output folder
animepahe-dl -a "bleach" -e 1-10 -o /sdcard/Anime

# Print m3u8 links without downloading
animepahe-dl -a "one punch man" -e 1-3 -l

Options

Flag Description
-a Anime title to search
-e Episodes: 1, 1-5, 1,3,5, or * for all
-r Preferred resolution: 1080, 720, 480, 360
-o Output folder (default: ~/Anime)
-l Print m3u8 links only, skip downloading

How it works

  1. Searches the animepahe API
  2. Fetches the episode list
  3. Extracts the kwik.cx embed URL from the play page
  4. Fetches the kwik.cx page and extracts the obfuscated eval(function(p,a,c,k,e,d){...}) JavaScript block
  5. Transforms it for Node.js (eval(console.log() and executes it to get the real m3u8 URL
  6. Downloads the m3u8 stream with ffmpeg

License

MIT

Release files for pahe-dl 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pahe-dl 0.1.0
File Size Uploaded
pahe_dl-0.1.0.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pahe-dl 0.1.0
File Interpreter ABI Platform
pahe_dl-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.9 kB

Release files / pahe_dl-0.1.0.tar.gz

Download URL pahe_dl-0.1.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1cf7d72fb1b5c74e36b207952148321a61a9f6a0bc3f303155560fa0cbe05f48
BLAKE2b-256 checksum
How to use checksums
eb9e447d59a4f89917542275ed03b31b3a1122b4216955f5f09911af1d6d47d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / pahe_dl-0.1.0-py3-none-any.whl

Download URL pahe_dl-0.1.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
44529389885b5513b35d32eaf323a21b0ef573b6b0b8a1e189b876c6e0c6d6a1
BLAKE2b-256 checksum
How to use checksums
afc395416eac0d2565a7c54456ee43c66370a988ad9fee4dba55bb14c180b263
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page