Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfswolke committed Jan 15, 2025
2 parents f3ca8a2 + a4cf1e7 commit 79e758d
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 94 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
logger.info("-----------------------------------------------------------")
logger.info(" AnimeSerienScraper Stopped")
logger.info("-----------------------------------------------------------")
logger.info("Downloads may still be running. Please dont close this Window until its done.")
logger.info("Downloads may still be running. Please don't close this Window until its done.")
logger.info(
"You will know its done once you see your primary prompt string. Example: C:\\XXX or username@hostname:")

Expand Down
123 changes: 62 additions & 61 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,65 @@
# Anime/Serien Scraper

Scraper for the Anime Hoster Aniworld and the Serien Hoster SerienStream

This tool will download either all Seasons and Episodes of an anime from Aniworld.to
or it will download all Seasons and Episodes of a serie from S.to

How to use:

- Clone the Repo
- `pip install -r requirements.txt`
- download or install [ffmpeg](https://ffmpeg.org) (If you download it put it in the root folder or src folder)

- On Unix for easy use take the _run.sh_ file and edit the desired values
- On Windows for easy use take the _run.bat_ file and past the desired values in the command line

Manual usage with python:
- You can either edit the `src/constants.py` file or pass the values as arguments to the `main.py` file

Supported Arguments:
- `--type <TYPE>`: Either "serie" or "anime" to switch between websites to scrape.
- `--name <NAME>`: The name of the anime or serie you want to download.
- `--lang <LANGUAGE>`: The language you want to download. Normaly "Deutsch", "Ger-Sub", "English" or "Eng-Sub".
- `--dl-mode <DownloadMode>`: The type of content you want to download. Valid arguments are: Movies, Series, All.
- `--season-override <SeasonOverride>`: Specify which season to Download. `0` download ALL seasons,
`NUM` download only the specified season, `NUM+` download this season and beyond.
- `--provider <ProviderOverride>`: Specify the provider to use. Valid arguments are: VOE, Streamtape and Vidoza.

## Manual download
If you get a error or only need a specific episode you can download it manually with the `Manual_download.py` script.

Run it with the same arguments as you would main.py.
- Edit the `src/constants.py` and change the `episode_override` to the desired episode.
- Run `python Manual_download.py <TYPE> <NAME> <LANGUAGE> <DownloadMode> [SeasonOverride] [ProviderOverride]`

## Values/Overrides

### Required:

- type_of_media: Either "serie" or "anime" so the tool uses the correspondig url
- name: Enter the anime or serie name you want to download. It has to be in the naming scheme _word-word-word_.
- language: Determine the desired language of the files. Common options are: "Deutsch", "Ger-Sub" and "English"

### Optional:

- dlMode: Choose the type of Content you want to download. Valid arguments are: Movies, Series, All. Default is Series.
- season_override: Specify which season to Download. 0 is the Default and will download all Seasons.

## Constants

- episode_override: Specify which episode to start downloading. 0 is the Default and will download all Episodes.
- ddos_protection_calc: How many episodes to download before waiting 60 seconds. Default 4.
- ddos_wait_timer: How long to wait until next download batch starts. Default 60.
- output_path: Specify the output path. Default is the current working directory/Name-Of-Series.
# Anime/Series Scraper

This tool enables you to scrape and download all seasons and episodes of anime from Aniworld.to or series from SerienStream (S.to).

## How to Use

1. Clone the repository.
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Download or install [FFmpeg](https://ffmpeg.org):
- If downloaded, place it in the root or `src` folder.
4. Platform-specific setup:
- **Unix:** Edit the `_run.sh` file with desired values for easy execution.
- **Windows:** Edit and run the `_run.bat` file, entering the desired values directly into the command line.

### Manual Usage with Python
You can:
- Edit the `src/constants.py` file.
- Pass arguments directly to the `main.py` script.

#### Supported Arguments
- `--type <TYPE>`: Specify "serie" or "anime" to select the website to scrape.
- `--name <NAME>`: The name of the anime or series to download.
- `--lang <LANGUAGE>`: Desired language (e.g., "Deutsch", "Ger-Sub", "English", or "Eng-Sub").
- `--dl-mode <DownloadMode>`: Content type to download (e.g., Movies, Series, All).
- `--season-override <SeasonOverride>`: Specify seasons to download:
- `0`: Download all seasons.
- `NUM`: Download only the specified season.
- `NUM+`: Download this season and all subsequent seasons.
- `--provider <ProviderOverride>`: Specify the content provider (e.g., VOE, Streamtape, or Vidoza).

## Manual Download
If errors occur or only specific episodes are needed, use the `Manual_download.py` script:

1. Edit `src/constants.py` and set `episode_override` to the desired episode.
2. Run the script:
```bash
python Manual_download.py <TYPE> <NAME> <LANGUAGE> <DownloadMode> [SeasonOverride] [ProviderOverride]
```

## Configuration Values

### Required
- `type_of_media`: "serie" or "anime" to select the correct URL.
- `name`: The name of the anime or series, formatted as `word-word-word`.
- `language`: Desired language of the files (e.g., "Deutsch", "Ger-Sub", "English").

### Optional
- `dlMode`: Content type to download (Movies, Series, All; default: Series).
- `season_override`: Specify the season(s) to download (default: 0 for all seasons).

### Constants
- `episode_override`: Specify the starting episode (default: 0 for all episodes).
- `ddos_protection_calc`: Number of episodes to download before pausing (default: 4).
- `ddos_wait_timer`: Wait time (in seconds) before resuming downloads (default: 60).
- `output_path`: Output directory (default: current working directory/Series-Name).

## Support
Please create an issue in the repository for assistance.

Please create a Issue.

## Special Thanks:

Thank you to [Michtdu](https://github.com/Michtdu) for the workaround and code for the Captcha!

Thank you [speedyconzales](https://github.com/speedyconzales) for adding S.to support
## Special Thanks
- [Michtdu](https://github.com/Michtdu) for the workaround and Captcha code.
- [speedyconzales](https://github.com/speedyconzales) for adding support for S.to.
4 changes: 2 additions & 2 deletions repeat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ while true; do
echo ""
echo ""
echo ""
echo "There were no failures. Stopping the program."
echo "There were no errors. Stopping the program."
echo "Program ran $counter times"
break
fi
echo ""
echo ""
echo "There were Failures. Re-running the program."
echo "There were errors. Re-running the program."
echo ""
done

Expand Down
58 changes: 30 additions & 28 deletions run.bat
Original file line number Diff line number Diff line change
@@ -1,59 +1,61 @@
@echo off
chcp 850 >nul
cls

echo Select your Display Language:
echo Waehle deine anzeige Sprache:
echo Waehle deine Anzeige-Sprache:
echo.
echo 1. English
echo 2. Deutsch
echo 2. Deutsch (German)
echo.
set /p LANG=Language:
if %LANG%==1 goto eng
if %LANG%==2 goto ger

:eng
set hello_header=Welcome to AniWorldScraper!
set choose_media=Please choose the media type you want to download:
set choose_media=Please select the type of media you want to download:
set media_type_anime=1. Anime (Aniworld.to)
set media_type_series=2. Series (s.to)
set media_name=Please enter the name of the media you want to download:
set media_desc=Use the exact name as in the website URL. (angels-of-death)
set media_lang=Please choose the language of the media you want to download:
set media_name=Enter the exact name of the media you wish to download:
set media_desc=Use the precise name as in the website URL (e.g., angels-of-death).
set media_lang=Choose the language of the media:
set media_choice1=1. German
set media_choice2=2. German Subtitles
set media_choice3=3. English
set download_mode=Please choose the download mode:
set download_mode_movies=1. Only Movies
set download_mode_series=2. Only Series
set download_mode_all=3. All Content
set season_header=Please enter the season you want to download:
set season_desc=Enter 0 for all seasons.
set provider_header=Please choose the provider you want to download from:
set provider_desc=Default value is VOE
set start_scraper=Starting scraper now...
set finish_scraper=Done!
set download_mode=Select the download mode:
set download_mode_movies=1. Movies only
set download_mode_series=2. Series only
set download_mode_all=3. All content
set season_header=Enter the season you want to download:
set season_desc=Enter 0 to download all seasons.
set provider_header=Select the provider to download from:
set provider_desc=Default provider is VOE.
set start_scraper=Starting the scraper...
set finish_scraper=Download completed!
goto start

:ger
set hello_header=Willkommen bei AniWorldScraper!
set choose_media=Bitte waehle den Medientyp den du herunterladen moechtest:
set choose_media=Bitte waehle den Medientyp aus, den du herunterladen moechtest:
set media_type_anime=1. Anime (Aniworld.to)
set media_type_series=2. Serie (s.to)
set media_name=Bitte gebe den Namen des Mediums ein, das du herunterladen moechtest:
set media_desc=Verwende den genauen Namen wie in der Webseiten URL. (angels-of-death)
set media_lang=Bitte waehle die Sprache des Mediums, das du herunterladen moechtest:
set media_name=Gib den exakten Namen des Mediums ein, das du herunterladen moechtest:
set media_desc=Verwende den genauen Namen wie in der URL der Webseite (z. B. angels-of-death).
set media_lang=Waehle die Sprache des Mediums aus:
set media_choice1=1. Deutsch
set media_choice2=2. Mit deutschen Untertiteln
set media_choice3=3. Englisch
set download_mode=Bitte waehle den Download-Modus:
set download_mode=Bitte waehle den Download-Modus aus:
set download_mode_movies=1. Nur Filme
set download_mode_series=2. Nur Serien
set download_mode_all=3. Alle Inhalte
set season_header=Bitte geben Sie die Staffel ein, die Sie herunterladen moechten:
set season_desc=Geben Sie 0 fuer alle Staffeln ein.
set provider_header=Bitte waehlen Sie den Anbieter aus, von dem Sie herunterladen moechten:
set provider_desc=Standard wert ist VOE
set start_scraper=Scraper wird jetzt gestartet...
set finish_scraper=Fertig!
set season_header=Gib die Staffel ein, die du herunterladen moechtest:
set season_desc=Gib 0 ein, um alle Staffeln herunterzuladen.
set provider_header=Waehle den Anbieter aus, von dem du herunterladen moechtest:
set provider_desc=Standardanbieter ist VOE.
set start_scraper=Scraper wird gestartet...
set finish_scraper=Herunterladen abgeschlossen!
goto start

:start
Expand Down Expand Up @@ -123,4 +125,4 @@ echo %start_scraper%
set SCRIPT_PATH=main.py
python %SCRIPT_PATH% --type %TYPE% --name %NAME% --lang %LANGUAGUE% --mode %DLMODE% --season_override %SEASON% --provider %PROVIDER%
echo %finish_scraper%
PAUSE
PAUSE
4 changes: 2 additions & 2 deletions src/manual_episode_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def main():

read_check = os.access('DO_NOT_DELETE.txt', os.R_OK)
if read_check:
logger.debug("We have Read Permission")
logger.debug("We have Read Permission.")
else:
logger.error("No Read Permission. Please check if you own the Folder and/or have permissions to read.")
exit()
Expand Down Expand Up @@ -48,5 +48,5 @@ def main():
else:
logger.info("File not downloaded. Downloading: {}".format(file_name))
create_new_download_thread(cache_url, file_name, provider)
print("Downloads may still be running. Please dont close this Window until its done")
print("Downloads may still be running. Please don't close this Window until its done.")
print("You will know its done once you see your primary prompt string. Example: C:\\XXX or username@hostname:")

0 comments on commit 79e758d

Please sign in to comment.