Skip to main content

Build Status codecov

Command line utility that enables users to search for TV and movie torrents and stream using Peerflix automatically.

Features

  • Extracts Torrent data from multiple APIs.

  • Provides advanced search functionality. Filter by sort type (download count, seeds, likes), genres, minimum rating.

  • Includes subtitle support where subtitles can be downloaded automatically for the chosen TV show or movie.

Install

ezflix is available on the Python Package Index (PyPI) at https://pypi.python.org/pypi/ezflix

You can install ezflix using pip.

$ pip install ezflix

This program requires Peerflix. You can install Peerflix via npm.

$ npm install -g peerflix

Supported Media Players

Below is a list of media players supported in Peerflix.

  • mpv

  • airplay

  • vlc

  • mplayer

  • smplayer

  • mpchc

  • potplayer

  • webplay

  • omx

In ezflix, the default player is mpv. It will fallback to vlc if mpv isn’t found.

You can use the media_player argument to set your media player.

CLI Usage

usage: ezflix [-h] [--limit [LIMIT]] [--minimum_rating [MINIMUM_RATING]]
              [--media_player [{mpv,vlc,mplayer,smplayer,mpchc,potplayer,webplay,omx,airplay}]]
              [--latest] [--subtitles]
              [--sort_by [{download_count,like_count,date_added,seeds,peers,rating,title,year}]]
              [--sort_order [{asc,desc}]] [--quality [{720p,1080p,3d}]]
              [--genre GENRE] [--remove] [--no_seeds] [--debug] [--no-menu]
              [--language LANGUAGE] [-v]
              [{movie,tv}] query

positional arguments:
  {movie,tv}            The media type.
  query                 The search query.

optional arguments:
  -h, --help            show this help message and exit
  --limit [LIMIT]       TThe limit of results per page that has been set
  --minimum_rating [MINIMUM_RATING]
                        Used to filter movie by a given minimum IMDb rating
  --media_player [{mpv,vlc,mplayer,smplayer,mpchc,potplayer,webplay,omx,airplay}]
                        The media player.
  --latest              Play the latest TV episode.
  --subtitles           Load subtitles file.
  --sort_by [{download_count,like_count,date_added,seeds,peers,rating,title,year}]
                        Sorts the results by choosen value
  --sort_order [{asc,desc}]
                        Orders the results by either Ascending or Descending
                        order
  --quality [{720p,1080p,3d}]
                        Used to filter by a given quality.
  --genre GENRE         Used to filter by a given genre (See
                        http://www.imdb.com/genre/ for full list)
  --remove              Remove files on exit.
  --no_seeds            Include torrents that have no seeds
  --debug               Set this flag to print JSON to stdout.
  --no-menu             Set this flag to not show the usage menu on program
                        startup.
  --language LANGUAGE   Language as IETF code. Set this argument to download
                        subtitles in a given language.
  -v, --version         show program's version number and exit

Once you get the list of torrents returned, these options are available:

  • Enter the id of the search result you want to stream. This will start streaming the torrent in the media player specified.

  • Enter ‘next’ to see the next page of movies.

  • Enter ‘prev’ to see the previous page of movies.

  • Enter ‘search’ to refine your search.

  • Enter ‘info’ and the id of the torrent to get the movie/tv show overview.

  • Enter ‘trailer’ and the id of the torrent to play the movie trailer.

  • Enter ‘similar’ and the id of the torrent to find similar movies.

  • Enter ‘imdb’ and the id of the torrent to open the imdb media webpage.

  • Enter ‘quit’ to close the program.

Examples

$ ezflix "The Man in the High Castle"

Pass ‘–latest’ to watch the latest episode of a given TV series.

$ ezflix "South Park" --latest

To search for movies, pass the ‘movie’ argument.

$ ezflix movie "Mad Max"

Search for movies released in 2017 and order by like count descending.

$ ezflix movie '2017' --sort_by=like_count --sort_order=desc

Search for thrillers released in 2017 and order by download count descending.

$ ezflix movie '2017' --sort_by=download_count --sort_order=desc --genre=thriller

Automatically download German subtitles for your chosen TV show or movie.

$ ezflix movie 'Goodfellas' --subtitles --language=de

Pass the quality argument to only list torrents of a given quality.

$ ezflix movie 'They Live' --quality=720p

Tests

The Python unittest module contains its own test discovery function, which you can run from the command line:

$ python -m unittest discover tests/

Programmatic Usage

You can use Ezflix programmatically in your own applications.

Search for movie torrents by title and print out the torrent link for each result.

from ezflix import Ezflix

ezflix = Ezflix(query='Goodfellas', media_type='movie', quality='720p', limit=1)
movies = ezflix.search()
for movie in movies:
    print(movie['magnet'])

Search for tv torrents by title and print out the torrent link for each result.

from ezflix import Ezflix

ezflix = Ezflix(query='chernobyl')
shows = ezflix.search()
for s in shows:
    print(s['magnet'])

Contributing

Pull requests and feedback on how to improve this project is always welcome.

To submit a PR:

  • Fork the project and clone locally.

  • Create a new branch for what you’re going to work on.

  • Push to your origin repository.

  • Create a new pull request in GitHub.

Release files for ezflix 1.5.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ezflix 1.5.6
File Size Uploaded
ezflix-1.5.6.tar.gz 11.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ezflix 1.5.6
File Interpreter ABI Platform
ezflix-1.5.6-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 24.2 kB

Release files / ezflix-1.5.6.tar.gz

Download URL ezflix-1.5.6.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1ba62fa03af5d2fa30aaa55ef236cc257eb7bcb69a74e1b93551ac6f19e1ba34
BLAKE2b-256 checksum
How to use checksums
ce2cc432874dec44f53e26a2ff6a8aa486d1b65a3a6114fbe0e0cd0aade06656
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / ezflix-1.5.6-py2.py3-none-any.whl

Download URL ezflix-1.5.6-py2.py3-none-any.whl
Size 12.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8354b4e02dc5a73db484ec21d5351855b99a4f9697f9431bb0c781bbd8b72e54
BLAKE2b-256 checksum
How to use checksums
c1d24b518e3baac06480088e3b0135c33fa8969aab59f785e357070e729c6ed6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

1.6.5

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

This release

1.5.6 This release

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.9

2 release files

1.4.8

2 release files

1.4.7

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page