Skip to main content

A Feature rich API wrapper for Disney+ made with python.

Project description

Disney+ API wrapper

A future rich API wrapper for Disney+ made with python.

How to install

pip install pydisney

https://pypi.org/project/pydisney

Usage/Examples

Simple search

from pydisney import DisneyAPI

api = DisneyAPI(email="email", password="password")
searches = api.search("Star wars")
print(searches[0].title) # prints title of the first search hit

Advanced usage

from pydisney import DisneyAPI
from pydisney import HitType
from pydisney import Language
from pydisney import Rating

# forces to use disney's login api instead of cached access and refresh tokens
# sets proxies
api = DisneyAPI(email="email", password="password", proxies={}, force_login=True)

profileId = api.get_profiles()[0].id  # grabs the first profile's id
print(api.set_active_profile(profileId)) # if profile is locked, pass pin as an argument
print(api.get_active_profile())

api.set_language(Language.POLISH)  # sets language to Polish, from now all data will be returned in that language

searches = api.search("Star wars", rating=Rating.AGE9PLUS)
print(searches[0].title)

# checks if the search hit is a series or a movie
if searches[0].type == HitType.SERIES:
    # prints s01e01's full description
    print(searches[0].get_seasons()[0].get_episodes()[0].full_description)

if searches[0].type == HitType.MOVIE:
    print(searches[0].length)  # returns in milliseconds
    print(searches[0].cast)
    print(searches[0].audio_tracks)
    print(searches[0].subtitles)

More examples

from pydisney import MovieType, SeriesType

# Search by program type
print(api.search_program_type(MovieType.ALL))
# or
print(api.search_program_type(SeriesType.KIDS))

Downloading subtitles

# by default download path is downloads/
api.set_download_path("custom/downloads")
search = api.search_movies("star wars")[0]
subs = search.subtitles
for sub in subs:
    if sub.language == "pl":
        sub.download(name="name")

Downloading audio

search = api.search_series("marvel")[0].get_seasons()[0].get_episodes()[0]
audios = search.audio_tracks
for audio in audios:
    if audio.language == "pl":
        audio.download(name="name", quality="max")  # allowed max or min, feel free to make a PR to add custom ones

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Disclaimer

This project can only be used for educational purposes. Using this software for malicious intent is illegal, and any damages from misuse of this software will not be the responsibility of the author.

License

MIT

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

pydisney-1.5.0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

pydisney-1.5.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file pydisney-1.5.0.tar.gz.

File metadata

  • Download URL: pydisney-1.5.0.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for pydisney-1.5.0.tar.gz
Algorithm Hash digest
SHA256 d3b29bb5a885ae27e5ae786c49e8a7c0b9da8126894326a6bee3421f54ab469a
MD5 a88236fa20c370e35dd313fc05719eb4
BLAKE2b-256 16fd404a5cfc996b5b8cce817ad917a9b6cd5903559bbe3ca621deaa267df2b7

See more details on using hashes here.

File details

Details for the file pydisney-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: pydisney-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for pydisney-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 268ae2663f5c9db3a59a0b255e0c1019b2ac9ff73ba6924e49a5b5fba3b350da
MD5 ec20c35b797d76e7303c1e26d039571d
BLAKE2b-256 bf98f9968ee3dcc95208065ca601579ff5b3810d82663e41e736ca9406f9b7e3

See more details on using hashes here.

Supported by

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