pydisney


Namepydisney JSON
Version 1.5.0 PyPI version JSON
download
home_pageNone
SummaryA Feature rich API wrapper for Disney+ made with python.
upload_time2024-10-04 16:32:16
maintainerNone
docs_urlNone
authorPamparampampam
requires_python>=3.7
licenseMIT License Copyright (c) 2024 Pamparampam Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords disney disneyplus api wrapper client python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# 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
```python
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

```python
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
```python
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

```python
# 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

```python
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](https://choosealicense.com/licenses/mit/)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pydisney",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "disney, disneyplus, api, wrapper, client, python",
    "author": "Pamparampampam",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/16/fd/404a5cfc996b5b8cce817ad917a9b6cd5903559bbe3ca621deaa267df2b7/pydisney-1.5.0.tar.gz",
    "platform": null,
    "description": "\n# Disney+ API wrapper\n\nA future rich API wrapper for Disney+ made with python.\n\n\n## How to install\n    pip install pydisney\n\nhttps://pypi.org/project/pydisney\n\n## Usage/Examples\n\n### Simple search\n```python\nfrom pydisney import DisneyAPI\n\napi = DisneyAPI(email=\"email\", password=\"password\")\nsearches = api.search(\"Star wars\")\nprint(searches[0].title) # prints title of the first search hit\n```\n### Advanced usage\n\n```python\nfrom pydisney import DisneyAPI\nfrom pydisney import HitType\nfrom pydisney import Language\nfrom pydisney import Rating\n\n# forces to use disney's login api instead of cached access and refresh tokens\n# sets proxies\napi = DisneyAPI(email=\"email\", password=\"password\", proxies={}, force_login=True)\n\nprofileId = api.get_profiles()[0].id  # grabs the first profile's id\nprint(api.set_active_profile(profileId)) # if profile is locked, pass pin as an argument\nprint(api.get_active_profile())\n\napi.set_language(Language.POLISH)  # sets language to Polish, from now all data will be returned in that language\n\nsearches = api.search(\"Star wars\", rating=Rating.AGE9PLUS)\nprint(searches[0].title)\n\n# checks if the search hit is a series or a movie\nif searches[0].type == HitType.SERIES:\n    # prints s01e01's full description\n    print(searches[0].get_seasons()[0].get_episodes()[0].full_description)\n\nif searches[0].type == HitType.MOVIE:\n    print(searches[0].length)  # returns in milliseconds\n    print(searches[0].cast)\n    print(searches[0].audio_tracks)\n    print(searches[0].subtitles)\n\n```\n\n### More examples\n```python\nfrom pydisney import MovieType, SeriesType\n\n# Search by program type\nprint(api.search_program_type(MovieType.ALL))\n# or\nprint(api.search_program_type(SeriesType.KIDS))\n\n```\n\n### Downloading subtitles\n\n```python\n# by default download path is downloads/\napi.set_download_path(\"custom/downloads\")\nsearch = api.search_movies(\"star wars\")[0]\nsubs = search.subtitles\nfor sub in subs:\n    if sub.language == \"pl\":\n        sub.download(name=\"name\")\n```\n### Downloading audio\n\n```python\nsearch = api.search_series(\"marvel\")[0].get_seasons()[0].get_episodes()[0]\naudios = search.audio_tracks\nfor audio in audios:\n    if audio.language == \"pl\":\n        audio.download(name=\"name\", quality=\"max\")  # allowed max or min, feel free to make a PR to add custom ones\n```\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first\nto discuss what you would like to change.\n\n## Disclaimer\n\nThis 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.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Pamparampam  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A Feature rich API wrapper for Disney+ made with python.",
    "version": "1.5.0",
    "project_urls": {
        "Github": "https://github.com/pam-param-pam/Disney-Plus-api-wrapper"
    },
    "split_keywords": [
        "disney",
        " disneyplus",
        " api",
        " wrapper",
        " client",
        " python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bf98f9968ee3dcc95208065ca601579ff5b3810d82663e41e736ca9406f9b7e3",
                "md5": "ec20c35b797d76e7303c1e26d039571d",
                "sha256": "268ae2663f5c9db3a59a0b255e0c1019b2ac9ff73ba6924e49a5b5fba3b350da"
            },
            "downloads": -1,
            "filename": "pydisney-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ec20c35b797d76e7303c1e26d039571d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 23950,
            "upload_time": "2024-10-04T16:32:15",
            "upload_time_iso_8601": "2024-10-04T16:32:15.200995Z",
            "url": "https://files.pythonhosted.org/packages/bf/98/f9968ee3dcc95208065ca601579ff5b3810d82663e41e736ca9406f9b7e3/pydisney-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16fd404a5cfc996b5b8cce817ad917a9b6cd5903559bbe3ca621deaa267df2b7",
                "md5": "a88236fa20c370e35dd313fc05719eb4",
                "sha256": "d3b29bb5a885ae27e5ae786c49e8a7c0b9da8126894326a6bee3421f54ab469a"
            },
            "downloads": -1,
            "filename": "pydisney-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a88236fa20c370e35dd313fc05719eb4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 18723,
            "upload_time": "2024-10-04T16:32:16",
            "upload_time_iso_8601": "2024-10-04T16:32:16.649771Z",
            "url": "https://files.pythonhosted.org/packages/16/fd/404a5cfc996b5b8cce817ad917a9b6cd5903559bbe3ca621deaa267df2b7/pydisney-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-04 16:32:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pam-param-pam",
    "github_project": "Disney-Plus-api-wrapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pydisney"
}
        
Elapsed time: 0.55881s