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.
-
Python 3.x
-
The
requests
,beautifulsoup4
,selenium
, andwebdriver-manager
Python libraries. You can install them by running: -
For the
geckodriver
or firefox driver shud automatically be downloaded by the script -
For
chromedriver
, the script will download it automatically if not available -
The same also goes for brave
To use the script, run it in your terminal using the following command:
python fetchanime.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-b
,--browser
: choose the browser to use (chrome
,firefox
orbrave
). If omitted, the script will usechrome
by default. Useffgui
for a GUI Firefox window.-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.
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
This script was created by Arinze using the following resources: