Clean anime scrapper & downloader made using selenium automation.
Bulk download your favourite anime episodes from gogoanime website all you need to do is setup some environment variables (basically options for downloading) and use the CLI.
Sample usage :
py main.py --link="LINK" --quality="QUALITY" --start="START" --max="MAX"
Before you begin to automate your favourite anime downloading you need to install the required dependencies.
The first step would be to clone the repo.
ChromeDriver.exe
: Required by selenium to control chrome browser.Modules
:- Selenium : Core for automation.
- Cloudscrapper : For getting html.
- BeautifulSoup : Used for scrapping.
- Python Dotenv : For loading env.
- Cliopts : For parsing cli argurments.
Chrome diver download link : Official download link
You need to download the exact version of chromedriver as your chrome browser. For checking the version of your chrome browser , you can type
chrome://version/
in search bar and hit enter to check the version.
All packages are listed in the requirements.txt all you need to so is run this simple command :
pip install -r requirements.txt
This command recursively downloads the required python packages and install them.
Dev tip : Use a virtual environment to prevent making the packages global which might cause conflicts !
After successfully installing chrome driver and python packages , you need to setup some environment variables to get things ready to be in action. You can do so by filling up required envs values in .env
file.
Environment vars :
WEBDRIVER_PATH
: Requires the absolute path of chromedriver.exe file you downloaded.DOWNLOAD_DIRECTORY
: Sets the default download directory path to which the downloads will be stored.ANIME_DOWNLOAD_LINK
: Sets the anime download link.DOWNLOAD_QUALITY
: Sets the quality.
You need to get the link for
ANIME_DOWNLOAD_LINK
from theembtaku.pro
( former gogo-play.tv) website in an exact pattern like : https://embtaku.pro/videos/one-piece-episode
Accepted values for
DOWNLOAD_QUALITY
are 420p , 720p, 360p & 1080p.
Sample of a .env file :
WEBDRIVER_PATH = "C:\chromedriver\chromedriver.exe"
DOWNLOAD_DIRECTORY = "D:\Anime\One-Piece"
ANIME_DOWNLOAD_LINK = "https://embtaku.pro/videos/one-piece-episode"
DOWNLOAD_QUALITY = "720p"
You need to run these following commands which are basically flags .
link
: Used to replace the originalANIME_DOWNLOAD_LINK
if present in .env file with the param passed in cli.start
: Sets the episode from which the loop starts.max
: Sets the maximum episodes to download . Basically helps in creating a range from start till start + max
Without shorthand args
py main.py --link="https://embtaku.pro/videos/gintama-episode" --quality="720p" --start=1 --max=10 --downloads_dir="C:/User/Downloads"
With shorthand args
py main.py -l "LINK" -q "QUALITY" -s "START" -m "MAX" -d "DOWNLOADS_DIR"
If any queries feel to get in touch with me .
Email : [email protected]
HAPPY ANIME WATCHING :-)