Skip to content

haxsysgit/autopahe

Repository files navigation

PyPI version contributions welcome License OpenIssues

Windows Ubuntu

Autopahe

This is a Python script that can be used to search and download anime episodes from animepahe. It uses the requests, beautifulsoup4, and selenium libraries to interact with the website and scrape relevant data.

Requirements

  • Python3
  • Any of the main web browser(Chrome,firefox,brave, e.t.c)

Script dependencies

  • Selenium
  • BeautifulSoup4
  • requests
  • webdriver-manager
  • tqdm

Getting Started

  1. Make sure you have Python and Firefox installed in your system
  2. Install PyPI package using pip install autopahe
  3. Wait for pip to install autopahe and all required dependencies. Enjoy the script 😊

Usage

  • Syntax: autopahe -<optional arguments>
  • To run the script, execute autopahe

Features

  • Search for an anime.
  • Select anime from search result.
  • Select episodes to download.
  • Downloads are made using inbuilt-dlr (default).
  • Inbuilt-dlr finds and resumes incomplete downloads by default.
  • Episode Selection Options:
    • i : downloads episode i.

      • eg:- 1 : downloads episode 1, 5 downloads episode 5 and so on.
    • x-y : downloads episodes from x to y.

      • eg:- 3-9 : downloads episodes 3 to 9 (3 and 9 inclusive)
    • In case of multiple options, each options must be seperated by a ,

    • Example: 1, 3, 6-11 : downloads episodes 1,3,6,7,8,9,10,11

Images

Search Utility Example other interaction Finished Downloads

Command line features

To use the script, run it in your terminal using the following command:

python auto_pahe.py [-h] [-b BROWSER] [-s SEARCH] [-sh SEARCH_HIDDEN] [-i INDEX] [-sd SINGLE_DOWNLOAD] [-md MULTI_DOWNLOAD_OPTIMIZED] [-mdv MULTI_DOWNLOAD_VERBOSE] [-a ABOUT]

Here are the available options:

  • -h, --help: show the help message and exit
  • -s, --search: search for an anime using a keyword. The script will display a list of matching results.
  • -sh, --search_hidden: search for an anime using its name and index. This option is less verbose than the regular search.
  • -i, --index: choose an anime from the search results by its index.
  • -sd, --single_download: download a single episode of an anime by its number.
  • -md, --multi_download_optimized: download multiple episodes of an anime at once using a faster, optimized method. Specify a comma-separated string of episode numbers to download.
  • -mdv, --multi_download_verbose: download multiple episodes of an anime at once and show a verbose output. Specify a comma-separated string of episode numbers to download.
  • -a, --about: display an overview of the chosen anime.

Example Usage

Here are some example commands to run the script:

  • Search for an anime: python fetchanime.py --search "jujutsu kaisen"

  • Choose an anime from the search results: python fetchanime.py --search "jujutsu kaisen" --index 0

  • Download a single episode: python fetchanime.py --search "jujutsu kaisen" --single_download 1

  • Download multiple episodes (optimized): python fetchanime.py --search "jujutsu kaisen" --multi_download_optimized "1,2,3"

  • Download multiple episodes (verbose): python fetchanime.py --search "jujutsu kaisen" --multi_download_verbose "1,2,3"

  • Get an overview of an anime: python fetchanime.py --search "jujutsu kaisen" --index 0 --about

  • Downloading and Quality :

    • Files are downloaded to your Default downloads directory.
    • Downloads are taken care of by the inbuilt downloader on default.
    • Currently the download quality priority is only 720p

Notes

  • you need a browser to be installed for this script to work (since the script uses selenium for some of its functions).

  • This script is a work under progress and therefore may lack some features, please bear with it, and consider contributing if you have any fixes or improvements ☺️.

  • In Windows the webdriver if found to misbehave if the script is forced to exit using ctrl^c. A good solution to this couldn't be found and a temporary fix have been implemented. And as such, please be noted that if you use ctrl^c to exit, your active firefox sessions or tabs have a good chance of crashing. (Note: ctrl^c doesn't have any issues in Linux)

Acknowledgments

This script was created by Arinze(haxsys) using the following resources:

About

Automatically download your all favorite anime from AnimePahe

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages