Skip to main content

A scraping API for Yify.

Project description

This is my API for scraping Yify

PyPI version

#USAGE

First you have to import it.

from YifyAPI import yify as api

Now you are ready to use it!

Currently the only method is :

api.search_yify(query: str)

It will return a list with dictionaries for each movie result found, example below:

{
        "title": "Sonic the Hedgehog",
        "year": "2020",
        "director": [
            "Jeff Fowler",
            "https://www.imdb.com/name/nm1733778/"
        ],
        "cast": [
            [
                "Jim Carrey",
                "https://www.imdb.com/name/nm0000120/"
            ],
            [
                "James Marsden",
                "https://www.imdb.com/name/nm0005188/"
            ],
            [
                "Neal McDonough",
                "https://www.imdb.com/name/nm0568180/"
            ],
            [
                "Tika Sumpter",
                "https://www.imdb.com/name/nm1754366/"
            ]
        ],
        "subtitles": "https://yifysubtitles.org/movie-imdb/tt3794354/",
        "related_movies": [
            [
                "Clerks II (2006)",
                "https://yts.mx/movies/clerks-ii-2006"
            ],
            [
                "Planet of the Apes (1968)",
                "https://yts.mx/movies/planet-of-the-apes-1968"
            ],
            [
                "*batteries not included (1987)",
                "https://yts.mx/movies/batteries-not-included-1987"
            ],
            [
                "Hedgehog (2017)",
                "https://yts.mx/movies/hedgehog-2017"
            ]
        ],
        "synopsis": "Based on the global blockbuster videogame franchise from Sega, SONIC THE HEDGEHOG tells the story of the world's speediest hedgehog as he embraces his new home on Earth. In this live-action adventure comedy, Sonic and his new best friend Tom (James Marsden) team up to defend the planet from the evil genius Dr. Robotnik (Jim Carrey) and his plans for world domination. The family-friendly film also stars Tika Sumpter and Ben Schwartz as the voice of Sonic.",
        "categories": [
            "Action",
            "Adventure",
            "Comedy",
            "Family",
            "Sci-Fi"
        ],
        "link": "https://yts.mx/movies/sonic-the-hedgehog-2020",
        "imdbLink": "https://www.imdb.com/title/tt3794354/",
        "trailer": "https://www.youtube.com/watch?v=szby7ZHLnkA",
        "imdbRating": "6.6/10",
        "image": "https://img.yts.mx/assets/images/movies/sonic_the_hedgehog_2020/medium-cover.jpg",
        "qualities": {
            "720p": {
                "size": "908.03 MB",
                "magnet": "magnet:?....."
            },
            "1080p": {
                "size": "1.82 GB",
                "magnet": "magnet:?....."
            }
        }
}

if something goes bad and there was an error then it will return this:

{'status': "error"}

So make sure to check if the response is equal to the one above with an if statement.

If you encounter any bug with my code or you want to contribute in any way then here is the github link

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

YifyAPI-0.6.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

YifyAPI-0.6.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file YifyAPI-0.6.2.tar.gz.

File metadata

  • Download URL: YifyAPI-0.6.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for YifyAPI-0.6.2.tar.gz
Algorithm Hash digest
SHA256 2c074cd7d7509fa452de07c9a2a254622d887edcdc41ce8a5d4c35b46148b11b
MD5 da20e41c599a0ec1dd776d43fdf0fc66
BLAKE2b-256 bfdfec0fbf3c5fda127075107d0ae7458fc651bd8693db6e7b0f817296d86257

See more details on using hashes here.

File details

Details for the file YifyAPI-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: YifyAPI-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for YifyAPI-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e53c76dc0b29dcc941f3313f8a0a6c29811ade73173504cb58655fa727616319
MD5 b5333e618118acf501c1376a06da76bf
BLAKE2b-256 111717b39522932be534e2bfce1ac549a5291de5ae76f67b01b8d83e38d1cbd1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page