/fzseries-api

Unofficial Python SDK/API for fztvseries.live

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

fzseries-api

Python version Python Test License PyPi Latest release release date Black Python-publish Downloads Downloads

Unofficial Python SDK/API for fztvseries.live

from fzseries_api import Auto

Auto(
    query="Mr. Robot",
).run()

# Will show download progressbar
"""
[T 1/10] Mr. Robot - S01E01 - eps1.0_hellofriend.mov
179 MB ████████████████████                     47%|
"""

Installation

$ pip install fzseries-api[cli]

Alternatively, you can download standalone executable for your system from here.

Usage

1. Developers

Search Series Using Title

from fzseries_api import Search, TVSeriesMetadata, EpisodeMetadata, Download
from fzseries_api.models import SearchResults, TVSeriesSeason, EpisodeInSearch

search = Search(
    query = "Into the Badlands"
)

series_search_results : list[SearchResults] = search.results.series

#First series metadata
target_series_metadata = TVSeriesMetadata(
    series_search_results[0]
)

series_seasons:list[TVSeriesSeason] = target_series_metadata.results.seasons

# First season metadata
season_one_metadata = EpisodeMetadata(
    series_seasons[0]
)

season_one_episodes: list[EpisodeInSearch] = season_one_metadata.results.episodes

# download first episode
saved_to = Download(
    season_one_episodes[0]
).run()

print(
    saved_to
)

Search Series Using Filters

from fzseries_api import Search, TVSeriesMetadata, EpisodeMetadata, Download
from fzseries_api.models import SearchResults, TVSeriesSeason, EpisodeInSearch
from fzseries_api.filters import GenreFilter

search = Search(
    query = GenreFilter(
        genre="Sci-Fi"
    )
)

series_search_results : list[SearchResults] = search.results.series

#First series metadata
target_series_metadata = TVSeriesMetadata(
    series_search_results[0]
)

series_seasons:list[TVSeriesSeason] = target_series_metadata.results.seasons

# First season metadata
season_one_metadata = EpisodeMetadata(
    series_seasons[0]
)

season_one_episodes: list[EpisodeInSearch] = season_one_metadata.results.episodes

# download first episode
saved_to = Download(
    season_one_episodes[0]
).run()

print(
    saved_to
)

2. CLI

$ fzseries download <QUERY>
# e.g fzseries download "Mr. Robot"
$ fzseries download --help
Usage: fzseries download [OPTIONS] QUERY

  Download a whole series|seasons|episodes automatically

Options:
  -b, --by [series|episodes]      Query category
  -so, --season-offset INTEGER    Season number to start downloading from
  -eo, --episode-offset INTEGER   Episode number to start downloading from
  -l, --limit INTEGER             Number of proceeding episodes to download
                                  before stopping
  -t, --download-trials INTEGER   Number of trials before giving up on
                                  downloading an episode
  -r, --request-timeout INTEGER   Http request timeout while downloading
                                  episodes in seconds.
  -f, --format [High MP4|WEBM]    Preffered movie download format
  -d, --directory DIRECTORY       Parent directory for saving the downloaded
                                  contents
  --enable-progressbar / --disable-progressbar
                                  Show or hide downloading progress bar
  --quiet                         Do not stdout any interactive messages
  --include_metadata              Add series title and episode-id in filename
  --one-season-only               Download only one season and stop.
  --ignore-errors                 Ignore exceptions raised while downloading
                                  episode
  --confirm                       Confirm episodes before downloading them
  --help                          Show this message and exit.
$ fzseries --help
Usage: fzseries [OPTIONS] COMMAND [ARGS]...

  Unofficial Python SDK/API for fztvseries.live

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  discover  Search TV series using title or filter
  download  Download a whole series|seasons|episodes automatically
  metadata  Access particular series metadata - seasons and episodes

  Repository : https://github.com/Simatwa/fzseries-api

Note

fzseries_api provides a lot more than what you've just gone through here. Documenting isn't my thing, but I will try to update it as time goes by. Additionally, I cannot document this any better than the code itself; therefore, consider going through it.

Disclaimer

This project is not affiliated with or endorsed by fztvseries.live or its owners. The API may change without notice, and this project does not guarantee compatibility with all future updates. The developers of this project are not responsible for any damages or losses resulting from the use of this API. This project is provided AS IS, without warranty of any kind, express or implied.