Disney+ API wrapper
A feature rich API wrapper for Disney+ made with python.
Allows for audio and subtitle download!
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
More examples
from pydisney import DisneyAPI
from pydisney.models.Language import Language
# forces to use disney's login api instead of cached access and refresh tokens
api = DisneyAPI(email="email", password="password", force_login=True)
profile = api.get_profiles()[0] # grabs the first profile
print(api.set_active_profile(profile.id)) # if profile is locked, pass pin as an argument
active_profile = api.get_active_profile()
active_profile.set_profile_language(Language.English_UK) # sets language to english, from now all data will be returned in that language
searches = api.search("Star wars")
print(searches[0].title)
# checks if the search hit is a series or a movie
if searches[0].is_movie:
print(searches[0].length) # returns in milliseconds
print(searches[0].credits) # gets cast, directors etc
else:
# prints s01e01's full description
print(searches[0].seasons[0].episodes[0].full_description)
Download Audio and Subtitles
[!WARNING]
Audio download requiresffmpeginstalled and available in PATH.
from pydisney import DisneyAPI
episode = api.search("Andor")[0].seasons[0].episodes[0]
selector = episode.get_tracks()
print(selector.available_languages())
audio_group = selector.get_audios(language="pl")
best_audio = audio_group.filter_by_codec("eac").get_best_quality().download() # codec: eac or aac
best_audio.download()
sub = selector.get_subtitles("pl").get_forced().first()
sub.download("subtitle-name.vtt") # pass file name if you want. Subtitles are ALWAYS in vtt format
Docs? What docs, read the source code. 😎
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
Metadata
Release files for pydisney 3.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pydisney-3.0.3.tar.gz | 18.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydisney-3.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.3 kB
Release files / pydisney-3.0.3.tar.gz
| Download URL | pydisney-3.0.3.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4e99b26b76b9d0408f847b7050989aa1da7f28ab9d121ab92c7850cf76f6f52
|
|
BLAKE2b-256 checksum How to use checksums |
a039d0776b4f550958d4226b842f3d51521ea9ce6d9f83f8ea3f7c2797736c14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / pydisney-3.0.3-py3-none-any.whl
| Download URL | pydisney-3.0.3-py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
420623cd3f57b8a1c78741c691518dfacf505633057fadc0b9b59d079466b62f
|
|
BLAKE2b-256 checksum How to use checksums |
a2bf3160232ec4fe6e52d27944210620a92bfbfb6415781f671e6819efedc452
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|