fzmovies-api


Namefzmovies-api JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/Simatwa/fzmovies-api
SummaryUnofficial Python API/SDK for fzmovies.net
upload_time2024-11-16 16:18:09
maintainerSmartwa
docs_urlNone
authorSmartwa
requires_python>=3.10
licenseGPLv3
keywords movies fzmovies
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">fzmovies-api</h1>

<p align="center">
<a href="#"><img alt="Python version" src="https://img.shields.io/pypi/pyversions/fzmovies-api"/></a>
<a href="https://github.com/Simatwa/fzmovies-api/actions/workflows/python-test.yml"><img src="https://github.com/Simatwa/fzmovies-api/actions/workflows/python-test.yml/badge.svg" alt="Python Test"/></a>
<a href="LICENSE"><img alt="License" src="https://img.shields.io/static/v1?logo=GPL&color=Blue&message=GPLv3&label=License"/></a>
<a href="https://pypi.org/project/fzmovies-api"><img alt="PyPi" src="https://img.shields.io/pypi/v/fzmovies-api"></a>
<a href="https://github.com/Simatwa/fzmovies-api/releases"><img src="https://img.shields.io/github/v/release/Simatwa/fzmovies-api?label=Release&logo=github" alt="Latest release"></img></a>
<a href="https://github.com/Simatwa/fzmovies-api/releases"><img src="https://img.shields.io/github/release-date/Simatwa/fzmovies-api?label=Release date&logo=github" alt="release date"></img></a>
<a href="https://github.com/psf/black"><img alt="Black" src="https://img.shields.io/badge/code%20style-black-000000.svg"/></a>
<a href="https://github.com/Simatwa/fzmovies-api/actions/workflows/python-publish.yml"><img src="https://github.com/Simatwa/fzmovies-api/actions/workflows/python-publish.yml/badge.svg" alt="Python-publish"/></a>
<a href="https://pepy.tech/project/fzmovies-api"><img src="https://static.pepy.tech/personalized-badge/fzmovies-api?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Downloads" alt="Downloads"></a>
<a href="https://github.com/Simatwa/fzmovies-api/releases/latest"><img src="https://img.shields.io/github/downloads/Simatwa/fzmovies-api/total?label=Asset%20Downloads&color=success" alt="Downloads"></img></a>
<a href="https://hits.seeyoufarm.com"><img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com/Simatwa/fzmovies-api"/></a>
</p>

> Unofficial Python API/SDK for fzmovies.net

```python
from fzmovies_api import Auto

Auto(
     query="Fast and Furious 5",
     quality="720p",
  ).run()

# Will show download progressbar
"""
Fast_and_Furious_5_BluRay v2_720p.mkv
805 MB ██████████████████                            42%|
"""

```

## Installation

```
$ pip install fzmovies-api[all]
```

Alternatively, you can download binaries for your system from [here](https://github.com/Simatwa/fzmovies-api/releases/latest).

## Usage

<details>

<summary>
  <h3>Developers</h3>
</summary>

```python
# Search by Starcast

from fzmovies_api import Search

search = Search(
    query="Jason Statham",
    searchby="Starcast"
)

print(
    search.results
)

# Output
"""
<SearchResults movies=[<MovieInSearch title="Fast and Furious Presents - Hobbs and Shaw",year=2019> | <MovieInSearch title="Fast X",year=2023> | <MovieInSearch title="The Fate of the Furious [Part 8]",year=2017> | <MovieInSearch title="Mechanic Resurrection",year=2016> | <MovieInSearch title="The Meg",year=2018> | <MovieInSearch title="Wrath of Man",year=2021> | <MovieInSearch title="The Beekeeper",year=2024> | <MovieInSearch title="Operation Fortune Ruse de guerre",year=2023> | <MovieInSearch title="The Expendables 2",year=2012> | <MovieInSearch title="The Expendables 3",year=2014> | <MovieInSearch title="Meg 2 The Trench",year=2023> | <MovieInSearch title="Homefront",year=2013> | <MovieInSearch title="Parker",year=2013> | <MovieInSearch title="Safe",year=2012> | <MovieInSearch title="The Expendables 1",year=2010> | <MovieInSearch title="The Transporter 2002",year=2002> | <MovieInSearch title="Transporter 3 2008",year=2008> | <MovieInSearch title="Death Race",year=2008> | <MovieInSearch title="Expend4bles",year=2023> | <MovieInSearch title="Transporter 2 2005",year=2005>]>
"""
```

#### Perform Search Using Filters

```python
from fzmovies_api import Search
from fzmovies_api.filters import IMDBTop250Filter

search = Search(
    query = IMDBTop250Filter()
)

print(
    search.results
)


#Output
"""
<SearchResults movies=[<MovieInSearch title="Schindlers List",year=1993> | <MovieInSearch title="The Godfather - Part 1",year=1972> | <MovieInSearch title="Pulp Fiction",year=1994> | <MovieInSearch title="12 Angry Men",year=1957> | <MovieInSearch title="Terminator 2 Judgment Day",year=1991> | <MovieInSearch title="The Avengers",year=2012> | <MovieInSearch title="The Cold Light of Day",year=2012> | <MovieInSearch title="The Good the Bad and the Ugly",year=1966> | <MovieInSearch title="The Shawshank Redemption",year=1994> | <MovieInSearch title="Raging Bull",year=1980> | <MovieInSearch title="The Lion King",year=1994> | <MovieInSearch title="New Gladiators",year=2002> | <MovieInSearch title="The Dictator",year=2012> | <MovieInSearch title="The Matrix",year=1999> | <MovieInSearch title="Heat",year=1995> | <MovieInSearch title="2001 A Space Odyssey",year=1968> | <MovieInSearch title="The Silence of the Lambs",year=1991> | <MovieInSearch title="The Departed",year=2006> | <MovieInSearch title="Braveheart",year=1995> | <MovieInSearch title="Up",year=2009>]>
"""
```

#### Fetch All Search Results

```python
from fzmovies_api import Search
from fzmovies_api.filters import IMDBTop250Filter

search = Search(
    query = IMDBTop250Filter()
)

print(
    search.all_results
)

```

##### Limit movies and stream results

```python
from fzmovies_api import Search
from fzmovies_api.filters import MovieGenreFilter

search = Search(
    query = MovieGenreFilter(
        "Action"
    )
)

for result in search.get_all_results(
    limit=40,
    stream=True
    ):

    print(
        result, end='\n\n'
    )
```

#### Download Movies

```python
from fzmovies_api import Search, Navigate, DownloadLinks, Download
from fzmovies_api.filters import OscarsFilter

search = Search(
    query=OscarsFilter(
        category="Best Picture"
    )
)

for movie in search.all_results.movies:

    # Navigate to the specific movie-page
    movie_page = Navigate(movie).results

    # Go to page containing download link
    download_link_page = DownloadLinks(
        movie_page.files[1]
    )

    download_link_metadata = download_link_page.results

    # Follow the link to download the movie
    download_movie = Download(
        download_link_metadata.links[0]
    )

    print(
        "Downloading : '" + movie.title + "' of size " + download_link_metadata.size
    )

    # Dowload the movie using save method
    saved_to = download_movie.save(
        download_link_metadata.filename,
        # To silence progressbar & any other stdout:
        # progress_bar = False,
        # quiet = True
    )

    print(
        saved_to
    )
```

##### Using Auto

```python
from fzmovies_api import Auto
from fzmovies_api.filters import RecentlyReleasedFilter

start = Auto(
    query=RecentlyReleasedFilter(
        category="Hollywood"
    )
)

start.run()
```


</details>

### CLI

- Basic case yet very handy

   ```sh
   $ python -m fzmovies_api download <QUERY>
   # e.g python -m fzmovies_api download "Thor - Love and Thunder"
   ```

> [!TIP]
> Shorthand for `python -m fzmovies_api` is `fzmovies`

<details>

<summary>
   <code>$ fzmovies download --help</code>
</summary>

```
Usage: python -m fzmovies_api download [OPTIONS] QUERY

  Perform search and download first movie in the search results

Options:
  -s, --searchby [Name|Director|Starcast]
                                  Query search-by filter - Name
  -c, --category [All|Bollywood|Hollywood|DHollywood]
                                  Query movie category - All
  -q, --quality [480p|720p]       Movie file download quality - 720p
  -o, --output TEXT               Filename for saving the movie contents to
  -d, --directory TEXT            Directory for saving the movie contents -
                                  pwd
  -z, --chunk-size INTEGER        Chunk_size for downloading files in KB - 512
  -r, --resume                    Resume downloading incomplete files - False
  -q, --quiet                     Not to stdout anything - False
  -y, --yes                       Okay to all prompts - False
  --help                          Show this message and exit.

```

</details>

> [!NOTE]
> **fzmovies_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 fzmovies.net 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Simatwa/fzmovies-api",
    "name": "fzmovies-api",
    "maintainer": "Smartwa",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "movies, fzmovies",
    "author": "Smartwa",
    "author_email": "simatwacaleb@proton.me",
    "download_url": "https://files.pythonhosted.org/packages/ee/60/e60e889db7dce1559c14ee17f0ee900397b521f20028f136bcd421ea810e/fzmovies_api-0.1.4.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">fzmovies-api</h1>\n\n<p align=\"center\">\n<a href=\"#\"><img alt=\"Python version\" src=\"https://img.shields.io/pypi/pyversions/fzmovies-api\"/></a>\n<a href=\"https://github.com/Simatwa/fzmovies-api/actions/workflows/python-test.yml\"><img src=\"https://github.com/Simatwa/fzmovies-api/actions/workflows/python-test.yml/badge.svg\" alt=\"Python Test\"/></a>\n<a href=\"LICENSE\"><img alt=\"License\" src=\"https://img.shields.io/static/v1?logo=GPL&color=Blue&message=GPLv3&label=License\"/></a>\n<a href=\"https://pypi.org/project/fzmovies-api\"><img alt=\"PyPi\" src=\"https://img.shields.io/pypi/v/fzmovies-api\"></a>\n<a href=\"https://github.com/Simatwa/fzmovies-api/releases\"><img src=\"https://img.shields.io/github/v/release/Simatwa/fzmovies-api?label=Release&logo=github\" alt=\"Latest release\"></img></a>\n<a href=\"https://github.com/Simatwa/fzmovies-api/releases\"><img src=\"https://img.shields.io/github/release-date/Simatwa/fzmovies-api?label=Release date&logo=github\" alt=\"release date\"></img></a>\n<a href=\"https://github.com/psf/black\"><img alt=\"Black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"/></a>\n<a href=\"https://github.com/Simatwa/fzmovies-api/actions/workflows/python-publish.yml\"><img src=\"https://github.com/Simatwa/fzmovies-api/actions/workflows/python-publish.yml/badge.svg\" alt=\"Python-publish\"/></a>\n<a href=\"https://pepy.tech/project/fzmovies-api\"><img src=\"https://static.pepy.tech/personalized-badge/fzmovies-api?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Downloads\" alt=\"Downloads\"></a>\n<a href=\"https://github.com/Simatwa/fzmovies-api/releases/latest\"><img src=\"https://img.shields.io/github/downloads/Simatwa/fzmovies-api/total?label=Asset%20Downloads&color=success\" alt=\"Downloads\"></img></a>\n<a href=\"https://hits.seeyoufarm.com\"><img src=\"https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com/Simatwa/fzmovies-api\"/></a>\n</p>\n\n> Unofficial Python API/SDK for fzmovies.net\n\n```python\nfrom fzmovies_api import Auto\n\nAuto(\n     query=\"Fast and Furious 5\",\n     quality=\"720p\",\n  ).run()\n\n# Will show download progressbar\n\"\"\"\nFast_and_Furious_5_BluRay v2_720p.mkv\n805 MB \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588                            42%|\n\"\"\"\n\n```\n\n## Installation\n\n```\n$ pip install fzmovies-api[all]\n```\n\nAlternatively, you can download binaries for your system from [here](https://github.com/Simatwa/fzmovies-api/releases/latest).\n\n## Usage\n\n<details>\n\n<summary>\n  <h3>Developers</h3>\n</summary>\n\n```python\n# Search by Starcast\n\nfrom fzmovies_api import Search\n\nsearch = Search(\n    query=\"Jason Statham\",\n    searchby=\"Starcast\"\n)\n\nprint(\n    search.results\n)\n\n# Output\n\"\"\"\n<SearchResults movies=[<MovieInSearch title=\"Fast and Furious Presents - Hobbs and Shaw\",year=2019> | <MovieInSearch title=\"Fast X\",year=2023> | <MovieInSearch title=\"The Fate of the Furious [Part 8]\",year=2017> | <MovieInSearch title=\"Mechanic Resurrection\",year=2016> | <MovieInSearch title=\"The Meg\",year=2018> | <MovieInSearch title=\"Wrath of Man\",year=2021> | <MovieInSearch title=\"The Beekeeper\",year=2024> | <MovieInSearch title=\"Operation Fortune Ruse de guerre\",year=2023> | <MovieInSearch title=\"The Expendables 2\",year=2012> | <MovieInSearch title=\"The Expendables 3\",year=2014> | <MovieInSearch title=\"Meg 2 The Trench\",year=2023> | <MovieInSearch title=\"Homefront\",year=2013> | <MovieInSearch title=\"Parker\",year=2013> | <MovieInSearch title=\"Safe\",year=2012> | <MovieInSearch title=\"The Expendables 1\",year=2010> | <MovieInSearch title=\"The Transporter 2002\",year=2002> | <MovieInSearch title=\"Transporter 3 2008\",year=2008> | <MovieInSearch title=\"Death Race\",year=2008> | <MovieInSearch title=\"Expend4bles\",year=2023> | <MovieInSearch title=\"Transporter 2 2005\",year=2005>]>\n\"\"\"\n```\n\n#### Perform Search Using Filters\n\n```python\nfrom fzmovies_api import Search\nfrom fzmovies_api.filters import IMDBTop250Filter\n\nsearch = Search(\n    query = IMDBTop250Filter()\n)\n\nprint(\n    search.results\n)\n\n\n#Output\n\"\"\"\n<SearchResults movies=[<MovieInSearch title=\"Schindlers List\",year=1993> | <MovieInSearch title=\"The Godfather - Part 1\",year=1972> | <MovieInSearch title=\"Pulp Fiction\",year=1994> | <MovieInSearch title=\"12 Angry Men\",year=1957> | <MovieInSearch title=\"Terminator 2 Judgment Day\",year=1991> | <MovieInSearch title=\"The Avengers\",year=2012> | <MovieInSearch title=\"The Cold Light of Day\",year=2012> | <MovieInSearch title=\"The Good the Bad and the Ugly\",year=1966> | <MovieInSearch title=\"The Shawshank Redemption\",year=1994> | <MovieInSearch title=\"Raging Bull\",year=1980> | <MovieInSearch title=\"The Lion King\",year=1994> | <MovieInSearch title=\"New Gladiators\",year=2002> | <MovieInSearch title=\"The Dictator\",year=2012> | <MovieInSearch title=\"The Matrix\",year=1999> | <MovieInSearch title=\"Heat\",year=1995> | <MovieInSearch title=\"2001 A Space Odyssey\",year=1968> | <MovieInSearch title=\"The Silence of the Lambs\",year=1991> | <MovieInSearch title=\"The Departed\",year=2006> | <MovieInSearch title=\"Braveheart\",year=1995> | <MovieInSearch title=\"Up\",year=2009>]>\n\"\"\"\n```\n\n#### Fetch All Search Results\n\n```python\nfrom fzmovies_api import Search\nfrom fzmovies_api.filters import IMDBTop250Filter\n\nsearch = Search(\n    query = IMDBTop250Filter()\n)\n\nprint(\n    search.all_results\n)\n\n```\n\n##### Limit movies and stream results\n\n```python\nfrom fzmovies_api import Search\nfrom fzmovies_api.filters import MovieGenreFilter\n\nsearch = Search(\n    query = MovieGenreFilter(\n        \"Action\"\n    )\n)\n\nfor result in search.get_all_results(\n    limit=40,\n    stream=True\n    ):\n\n    print(\n        result, end='\\n\\n'\n    )\n```\n\n#### Download Movies\n\n```python\nfrom fzmovies_api import Search, Navigate, DownloadLinks, Download\nfrom fzmovies_api.filters import OscarsFilter\n\nsearch = Search(\n    query=OscarsFilter(\n        category=\"Best Picture\"\n    )\n)\n\nfor movie in search.all_results.movies:\n\n    # Navigate to the specific movie-page\n    movie_page = Navigate(movie).results\n\n    # Go to page containing download link\n    download_link_page = DownloadLinks(\n        movie_page.files[1]\n    )\n\n    download_link_metadata = download_link_page.results\n\n    # Follow the link to download the movie\n    download_movie = Download(\n        download_link_metadata.links[0]\n    )\n\n    print(\n        \"Downloading : '\" + movie.title + \"' of size \" + download_link_metadata.size\n    )\n\n    # Dowload the movie using save method\n    saved_to = download_movie.save(\n        download_link_metadata.filename,\n        # To silence progressbar & any other stdout:\n        # progress_bar = False,\n        # quiet = True\n    )\n\n    print(\n        saved_to\n    )\n```\n\n##### Using Auto\n\n```python\nfrom fzmovies_api import Auto\nfrom fzmovies_api.filters import RecentlyReleasedFilter\n\nstart = Auto(\n    query=RecentlyReleasedFilter(\n        category=\"Hollywood\"\n    )\n)\n\nstart.run()\n```\n\n\n</details>\n\n### CLI\n\n- Basic case yet very handy\n\n   ```sh\n   $ python -m fzmovies_api download <QUERY>\n   # e.g python -m fzmovies_api download \"Thor - Love and Thunder\"\n   ```\n\n> [!TIP]\n> Shorthand for `python -m fzmovies_api` is `fzmovies`\n\n<details>\n\n<summary>\n   <code>$ fzmovies download --help</code>\n</summary>\n\n```\nUsage: python -m fzmovies_api download [OPTIONS] QUERY\n\n  Perform search and download first movie in the search results\n\nOptions:\n  -s, --searchby [Name|Director|Starcast]\n                                  Query search-by filter - Name\n  -c, --category [All|Bollywood|Hollywood|DHollywood]\n                                  Query movie category - All\n  -q, --quality [480p|720p]       Movie file download quality - 720p\n  -o, --output TEXT               Filename for saving the movie contents to\n  -d, --directory TEXT            Directory for saving the movie contents -\n                                  pwd\n  -z, --chunk-size INTEGER        Chunk_size for downloading files in KB - 512\n  -r, --resume                    Resume downloading incomplete files - False\n  -q, --quiet                     Not to stdout anything - False\n  -y, --yes                       Okay to all prompts - False\n  --help                          Show this message and exit.\n\n```\n\n</details>\n\n> [!NOTE]\n> **fzmovies_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.\n\n## Disclaimer\n\nThis project is not affiliated with or endorsed by fzmovies.net 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.\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Unofficial Python API/SDK for fzmovies.net",
    "version": "0.1.4",
    "project_urls": {
        "Bug Report": "https://github.com/Simatwa/fzmovies-api/issues/new",
        "Documentation": "https://github.com/Simatwa/fzmovies-api/",
        "Download": "https://github.com/Simatwa/fzmovies-api/releases",
        "Homepage": "https://github.com/Simatwa/fzmovies-api",
        "Issue Tracker": "https://github.com/Simatwa/fzmovies-api/issues",
        "Source Code": "https://github.com/Simatwa/fzmovies-api"
    },
    "split_keywords": [
        "movies",
        " fzmovies"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ee60e60e889db7dce1559c14ee17f0ee900397b521f20028f136bcd421ea810e",
                "md5": "8cb081b12569c80adb79fa742e9900a5",
                "sha256": "68c7a459f1e2da3674657baa9dfb079e9226606bf536d650a18c691a889f480f"
            },
            "downloads": -1,
            "filename": "fzmovies_api-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "8cb081b12569c80adb79fa742e9900a5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 34818,
            "upload_time": "2024-11-16T16:18:09",
            "upload_time_iso_8601": "2024-11-16T16:18:09.874890Z",
            "url": "https://files.pythonhosted.org/packages/ee/60/e60e889db7dce1559c14ee17f0ee900397b521f20028f136bcd421ea810e/fzmovies_api-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-16 16:18:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Simatwa",
    "github_project": "fzmovies-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "fzmovies-api"
}
        
Elapsed time: 1.28450s