{ "info": { "author": "truedread", "author_email": "truedread11@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Utilities" ], "description": "# pymsl\n[![Build Status](https://travis-ci.com/truedread/pymsl.svg?branch=master)](https://travis-ci.com/truedread/pymsl)\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\nPython library for interacting with the Netflix MSL API\n\n# Usage\n\n### Basic Usage\n\n```python\n>>> import pymsl\n>>> user_auth_data = {\n... 'scheme': 'EMAIL_PASSWORD',\n... 'authdata': {\n... 'email': email,\n... 'password': password\n... }\n... }\n>>> client = pymsl.MslClient(user_auth_data)\n>>> client.load_manifest(80092521)\n{'version': 2, ...\n```\n\nAll user authentication schemes are defined in the MSL wiki: https://github.com/Netflix/msl/wiki/User-Authentication-(Configuration)\n\n### Custom Kwargs\n\n`pymsl.MslClient()` takes additional kwargs as well to override the defaults; the only required arg for initialization is user_auth_data:\n\n```python\n>>> pymsl.MslClient(\n... user_auth_data,\n... esn=CUSTOM_ESN, # default is NFCDCH-02-[random device ID]\n... drm_system=CUSTOM_DRM_SYSTEM, # default is 'widevine', you can use 'playready', 'fps', etc.\n... profiles=LIST_OF_PROFILES, # default is ['playready-h264mpl30-dash', 'playready-h264mpl31-dash', 'playready-h264mpl40-dash', 'heaac-2-dash', 'simplesdh', 'nflx-cmisc', 'BIF240', 'BIF320']\n... keypair=CUSTOM_CRYPTODOME_RSA_KEYPAIR, # default is a random 2048-bit keypair\n... message_id=CUSTOM_MESSAGE_ID, # default is a random integer between 0 and 2^52\n... languages=LIST_OF_LANGUAGES, # default is ['en_US']\n... proxies=PROXIES, # default is None\n... key_request_data=CUSTOM_KEY_REQUEST_DATA, # default is ASYMMETRIC_WRAPPED\n... extra_manifest_params=EXTRA_MANIFEST_PARAMS # default is a blank dict\n... )\n```\n\n- `esn` is the identity used for communicating with MSL. Different ESNs have different priveleges.\n- `drm_system` will determine what kind of initialization data you will receive in the manifest.\n- `profiles` is a list of profiles used for telling MSL what you want to receive in the manifest.\n- `keypair` is the RSA keypair used in the initial key exchange.\n- `message_id` is a random integer used for identifying the MSL client session.\n- `languages` is a list of languages used for determining the language of the manifest received.\n- `proxies` is a proxy dict passed the same way you would pass it to the [requests](https://2.python-requests.org/en/master/user/advanced/#proxies) library.\n- `key_request_data` is a dict passed to override the normal `ASYMMETRIC_WRAPPED` key request dict in order to enable using other key exchange mechanisms. Note that you may have to monkey patch the `parse_handshake` function in order for it to work with your specified key exchange mechanism.\n- `extra_manifest_params` is a dict of extra manifest params. Here's the default manifest params sent in a manifest request:\n\n```python\n'params': {\n 'type': 'standard',\n 'viewableId': viewable_id,\n 'profiles': self.msl_session['profiles'],\n 'flavor': 'STANDARD',\n 'drmType': self.msl_session['drm_system'],\n 'drmVersion': 25,\n 'usePsshBox': True,\n 'isBranching': False,\n 'useHttpsStreams': True,\n 'imageSubtitleHeight': 720,\n 'uiVersion': 'shakti-v4bf615c3',\n 'clientVersion': '6.0011.511.011',\n 'supportsPreReleasePin': True,\n 'supportsWatermark': True,\n 'showAllSubDubTracks': False,\n 'videoOutputInfo': [\n {\n 'type': 'DigitalVideoOutputDescriptor',\n 'outputType': 'unknown',\n 'supportedHdcpVersions': [],\n 'isHdcpEngaged': False\n }\n ],\n 'preferAssistiveAudio': False,\n 'isNonMember': False\n}\n```\n\nBy using this kwarg you can add any values you want to this param dict. For example, if you wanted `showAllSubDubTracks` to be true, you would set `extra_manifest_params` to `{'showAllSubDubTracks': True}`. The manifest param dict is simply `.update()`'ed with `extra_manifest_params`, so you can overwrite default values or add new ones.\n\n### Methods\n\n#### `load_manifest(viewable_id)`\n\n```\n@param viewable_ids: Int of viewable ID\n to obtain manifest for\n\n@return: manifest (dict)\n\nThis function performs a manifest request based on\nthe parameters supplied when initalizing the client\nobject. If there are no errors, it will return the\nmanifest as a dict. If there are errors, it will\nraise a ManifestError exception with the response\nfrom the MSL API as the body.\n```\n\n#### `get_license(challenge, session_id)`\n\n```\n@param challenge: EME license request as a byte string\n that will be used to obtain a license\n\n@param session_id: DRM specific session ID passed as a string\n\n@return: license (dict)\n\nThis function performs a license request based on\nthe parameters supplied when initalizing the client\nobject. If there are no errors, it will return the\nlicenses as a list of dicts. If there are errors, it will\nraise a LicenseError exception with the response\nfrom the MSL API as the body.\n```\n\n# Installation\n\nTo install, you can either clone the repository and run `python setup.py install` or you can run `pip install pymsl`\n\n# To-Do\n\n- [x] Implement license acquisition\n- [ ] Clean up chunked payload parsing", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/truedread/pymsl", "keywords": "", "license": "GNU GPLv3", "maintainer": "", "maintainer_email": "", "name": "pymsl", "package_url": "https://pypi.org/project/pymsl/", "platform": "", "project_url": "https://pypi.org/project/pymsl/", "project_urls": { "Homepage": "https://github.com/truedread/pymsl" }, "release_url": "https://pypi.org/project/pymsl/1.3/", "requires_dist": null, "requires_python": "", "summary": "Python library for interacting with the Netflix MSL API", "version": "1.3" }, "last_serial": 5598096, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "345a0efa1a3ef836425aa8ea6d8ac9de", "sha256": "96d2febb05467a7f4cfb14b4f6f4da5aade8d6973c0ddb908cf6364f26aef567" }, "downloads": -1, "filename": "pymsl-1.0.tar.gz", "has_sig": false, "md5_digest": "345a0efa1a3ef836425aa8ea6d8ac9de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4909, "upload_time": "2018-02-20T20:05:23", "url": "https://files.pythonhosted.org/packages/d2/aa/0c7af396c1c248726e905bec3008d74f0ed6c40a25d2688cc6a327c52e6a/pymsl-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "8fa93a7d9dc07f678c9f5f9121bd72fb", "sha256": "de5bd5e1d5a60a2d3306c2f934efa6e3badd09fbc3ff9ec1074c178b77ca8588" }, "downloads": -1, "filename": "pymsl-1.1.tar.gz", "has_sig": false, "md5_digest": "8fa93a7d9dc07f678c9f5f9121bd72fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5616, "upload_time": "2018-02-22T18:25:06", "url": "https://files.pythonhosted.org/packages/91/14/1bd39b92014faf8cd6eb003c2d1c97f158942bac4cc7fa343e17852ad6fa/pymsl-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "1aa6aa2ef199d279e1478970f7d6e0f7", "sha256": "214a4a26582d2e63862491dfa4234b4f3e12d36ac15c1f9bb12dae518010742f" }, "downloads": -1, "filename": "pymsl-1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "1aa6aa2ef199d279e1478970f7d6e0f7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8584, "upload_time": "2018-11-24T02:41:28", "url": "https://files.pythonhosted.org/packages/47/eb/4fe06e418e3774ad65545c0cf079c9328cc8360b78c2e8e7f78e1c3af5ae/pymsl-1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c322ae8d62ed93932912799ee199c20", "sha256": "d8f791e2b68b9fde8522ce371f7642b3f10480b5a1b5ba9a48ee4520a323e921" }, "downloads": -1, "filename": "pymsl-1.2.tar.gz", "has_sig": false, "md5_digest": "8c322ae8d62ed93932912799ee199c20", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7267, "upload_time": "2018-11-24T02:41:29", "url": "https://files.pythonhosted.org/packages/76/75/0413496b72e90cdd2ecc24f7a0e77ecf4824b13d905937556b06f11d65c0/pymsl-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "02c90a6110be1f880489e7c5aab83e98", "sha256": "5d96c9845a816af2c4463f2b8312b7deeac96d1d4b7f44beade3b2eef35fe1bf" }, "downloads": -1, "filename": "pymsl-1.3.tar.gz", "has_sig": false, "md5_digest": "02c90a6110be1f880489e7c5aab83e98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8081, "upload_time": "2019-07-29T07:52:50", "url": "https://files.pythonhosted.org/packages/9a/14/2cca96d73eadf9c310eb031d2f3f8db4ac9a66e4781cc23520ee574394d6/pymsl-1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "02c90a6110be1f880489e7c5aab83e98", "sha256": "5d96c9845a816af2c4463f2b8312b7deeac96d1d4b7f44beade3b2eef35fe1bf" }, "downloads": -1, "filename": "pymsl-1.3.tar.gz", "has_sig": false, "md5_digest": "02c90a6110be1f880489e7c5aab83e98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8081, "upload_time": "2019-07-29T07:52:50", "url": "https://files.pythonhosted.org/packages/9a/14/2cca96d73eadf9c310eb031d2f3f8db4ac9a66e4781cc23520ee574394d6/pymsl-1.3.tar.gz" } ] }