This is my API for scraping Yify
#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, proxy=None)
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.WEB": {
"size": "908.03 MB",
"magnet": "magnet:?....."
},
"720p.BluRay": {
"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
Metadata
Release files for YifyAPI 0.6.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| YifyAPI-0.6.5.tar.gz | 4.4 kB | Without provenance | Details for YifyAPI-0.6.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| YifyAPI-0.6.5-py3-none-any.whl | Python 3 | none | any | Details for YifyAPI-0.6.5-py3-none-any.whl |
Total release size: 9.0 kB
Release files / YifyAPI-0.6.5.tar.gz
| Download URL | YifyAPI-0.6.5.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d808fe4610322c835ca22a23d013cdebcc54752e08080f501cde737972532d4
|
|
BLAKE2b-256 checksum How to use checksums |
bed35b371abdf837a668f16d2428e54743bc77e0cecab0887d22ae66c44baa5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / YifyAPI-0.6.5-py3-none-any.whl
| Download URL | YifyAPI-0.6.5-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ea3df813a691e2736f81822a87c73f40dbb18a9f6e17999af9b024ae08ad85e
|
|
BLAKE2b-256 checksum How to use checksums |
f5ae14901461823903adc53c0e9460b1188a20ee1f22787918ec78aba27080bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for YifyAPI 0.6.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.