{ "info": { "author": "Andrzej Barga\u0144ski", "author_email": "a.barganski@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: No Input/Output (Daemon)", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Topic :: Multimedia :: Sound/Audio" ], "description": "****************************\nAudtekAPI\n****************************\n\n.. image:: https://img.shields.io/pypi/v/audtekapi.svg?style=flat\n :target: https://pypi.python.org/pypi/audtekapi/\n :alt: Latest PyPI version\n\n\n\nUnofficial API helper for *Audioteka* - audiobooks service: ``_\n\nThis is set of functions to get contents of your personal bookshelf at *Audioteka*, including book's chapters downloading.\n\nMain reason for creating it, is my upcoming plugin for `Mopidy\n`_.\n\nCurrently following functions are implemented:\n - get_categories - getting Categories (sign in not needed)\n - login - login into service\n - get_shelf - getting shelf content (sign in required)\n - get_shelf_item - getting single book detail (sign in required)\n - get_chapters - getting book's chapters list (sign in required)\n - get_chapter_file - getting one chapter file data (sign in required)\n - epoch_to_datetime - converts date time string seen in Audioteka's responses into Python's DateTime\n\n\nInstallation\n============\nPython 2.7 or higher is required.\n\nInstall by running::\n\n pip install audtekapi\n\n\n\nUsage\n=============\nExamples.\n\nsign in::\n\n bash> python\n Python 2.7.15\n >>>> import audtekapi\n >>> cred = audtekapi.login('some@mail.com', 'myPasswordAtAudioteka')\n >>> cred\n {u'AuthenticationToken': u'8122aaaa-aebc-22a1-2233-1111a11ceecb',\n u'Status': u'LoginStatusOk',\n u'HashedPassword': 'DB111ABC01A10203A10C010B4736E83746D838348AD7B8CAA11BBCC7854A010192A93841',\n u'Salt': u'3660123456', u'userLogin': 'a.barganski@gmail.com'}\n\nGetting shelf content::\n\n >>> shelf = audtekapi.get_shelf(cred)\n >>> shelf\n {\n u'Date':u'20190105',\n u'DownloadDateInMilliseconds':1546710438687,\n u'ServerAddress': u'http://mediaserver5.audioteka.pl/GetFileRouter.ashx'\n u'ShelfItemsCount':1,\n u'Footer':u'No=0&daa=true&httpStatus=true®en=true',\n u'Books':[\n {\n u'IsFreeChapterEnabled':False,\n u'BigPictureLink': u'https://static.audioteka.com/pl/images/products/calek-perechodnik/spowiedz-duze.jpg',\n u'IsSample':False,\n u'WMStatus':u'Done',\n u'Author':u'Calek Perechodnik',\n u'LineItemCategory':u'',\n u'IsForKids':False,\n u'IsAudiobookPlus':False,\n u'Reader':u'Maciej Wi\\u0119ckowski',\n u'Type':u'Audiobook - pe\\u0142ny',\n u'ListPrice':32.9,\n u'AverageRating':10,\n u'Status':u'Paid',\n u'LastWatermarkingDate':u'/Date(1546557722603+0100)/',\n u'SmallPictureLink': u'https://static.audioteka.com/pl/images/products/calek-perechodnik/spowiedz-male.jpg',\n u'Title':u'Spowied\\u017a',\n u'CanDownloadZip':True,\n u'SampleLink': u'https://static.audioteka.com/pl/content/samples/calek-perechodnik/spowiedz.mp3',\n u'UserRating':0,\n u'Cycle':u'',\n u'FilesDivisionMode':u'Normal',\n u'Publisher':u'Heraclon International',\n u'ProductDateAdd':u'/Date(1519206527537+0100)/',\n u'OrderTrackingNumber':u'1234567890',\n u'Length':861,\n u'LineItemId':u'00000eea-111a-2222-aa22-a1333aaa111f',\n u'BlackBerrySku':u'001199Audioteka',\n u'CategoryId':u'biografie',\n u'ProductId':u'spowiedz',\n u'MediumPicture': u'https://static.audioteka.com/pl/images/products/calek-perechodnik/spowiedz-srednie.jpg',\n u'CategoryName':u'Biografie',\n u'IPodDivisionMode':u'OneFile',\n u'RootCategoryId':u'',\n u'CreatedDate':u'/Date(1546553332470+0100)/',\n u'WatermarkingTarget':u'Normal',\n u'EbookLink':u''\n },\n }\n\nGetting book's chapters information::\n\n >>> chapters = audtekapi.get_chapters(shelf['Books'][0]['OrderTrackingNumber'], shelf['Books'][0]['LineItemId'], cred)\n >>> chapters\n [\n {u'Track': 1, u'Length': 335673, u'Size': 4920010, u'Link': u'001_Spowiedz.mp3', u'ChapterTitle': u'001_Spowiedz'},\n {u'Track': 2, u'Length': 1047450, u'Size': 14884993, u'Link': u'002_Spowiedz.mp3', u'ChapterTitle': u'002_Spowiedz'}\n ]\n\nDownloading one chapter and saving it into file::\n\n >>> r = audtekapi.get_chapter_file(shelf['Books'][0]['OrderTrackingNumber'], shelf['Books'][0]['LineItemId'], shelf['ServerAddress'], shelf['Footer'], chapters[1]['Link'], cred)\n >>> open(chapters[1]['Link'], 'wb').write(r.content)\n\n...or downloading as stream (chunks) and saving it into file:\n\n >>> r = audtekapi.get_chapter_file(shelf['Books'][0]['OrderTrackingNumber'], shelf['Books'][0]['LineItemId'], shelf['ServerAddress'], shelf['Footer'], chapters[1]['Link'], cred, True)\n >>> with open(chapters[1]['Link'], 'wb') as f:\n for chunk in r.iter_content(chunk_size=1024):\n if chunk:\n f.write(chunk)\n\n\nLicense\n=================\n\nApache License Version 2.0\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jedrus2000/audtekapi", "keywords": "", "license": "Apache License, Version 2.0", "maintainer": "", "maintainer_email": "", "name": "audtekapi", "package_url": "https://pypi.org/project/audtekapi/", "platform": "", "project_url": "https://pypi.org/project/audtekapi/", "project_urls": { "Homepage": "https://github.com/jedrus2000/audtekapi" }, "release_url": "https://pypi.org/project/audtekapi/0.2.0/", "requires_dist": [ "requests (>=2.21.0)", "setuptools" ], "requires_python": "", "summary": "Unofficial API for Audioteka", "version": "0.2.0" }, "last_serial": 4705502, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6d7142397447c07cc124f2b4de54cd95", "sha256": "ea7706220580bb78fa95adf7711815ce52db6237b1257b4df9b790da835ab9fa" }, "downloads": -1, "filename": "audtekapi-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6d7142397447c07cc124f2b4de54cd95", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9313, "upload_time": "2019-01-05T19:25:06", "url": "https://files.pythonhosted.org/packages/01/81/adfc09f86227f4103819921dbafe132a67ae3fdf18cd54095949f444c4ef/audtekapi-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b7ba4a23f74e96555416a18be20e7d36", "sha256": "6b2fc84e49a1f8c898f2f01f423feace348ed5d42644c0b7bb9d4eec33e7e374" }, "downloads": -1, "filename": "audtekapi-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b7ba4a23f74e96555416a18be20e7d36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9444, "upload_time": "2019-01-05T19:25:08", "url": "https://files.pythonhosted.org/packages/c3/8a/899426c06af914d1499f33fe61b0a0c9296083cb3aa1b5ef9e4301a6b457/audtekapi-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "814ba40b2a5cc076c1382024a6611d47", "sha256": "24456c3d3444b153ba9d22b25ff46f4eb028366b77cc17dbbf4153d49cb91069" }, "downloads": -1, "filename": "audtekapi-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "814ba40b2a5cc076c1382024a6611d47", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9309, "upload_time": "2019-01-05T19:48:00", "url": "https://files.pythonhosted.org/packages/c7/a9/a781f7905c26692b6eb7357076ff24c62218bb38985098cc62de6fcd259e/audtekapi-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dbed9786582954a34dbffb57071111a1", "sha256": "8b65f19a3984290636711086f0563699b2e0c5aedbbeffb145773468de5436d1" }, "downloads": -1, "filename": "audtekapi-0.1.1.tar.gz", "has_sig": false, "md5_digest": "dbed9786582954a34dbffb57071111a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9440, "upload_time": "2019-01-05T19:48:01", "url": "https://files.pythonhosted.org/packages/60/40/a2f87782b8f56f6b501845b741a15efb49bd812dd0f68bb71efcaebc0aba/audtekapi-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "870ddaa00ad1c724a5c5c505543955a3", "sha256": "4ef1c24f791babab1830d1e4bf60a6bc1c7ee75c76affb0efce0b83a05646af1" }, "downloads": -1, "filename": "audtekapi-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "870ddaa00ad1c724a5c5c505543955a3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8125, "upload_time": "2019-01-16T23:26:25", "url": "https://files.pythonhosted.org/packages/12/16/89dc09076e3253903b6bef80f46925430f8cca010a1b5c5d3357a59be747/audtekapi-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5e300164941fccc9176dc5ffb1bfbeea", "sha256": "df9d5bfb173e480b4e0b676ef71e73af4b68b52f9e0597f276ac246dda936323" }, "downloads": -1, "filename": "audtekapi-0.2.0.tar.gz", "has_sig": false, "md5_digest": "5e300164941fccc9176dc5ffb1bfbeea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9676, "upload_time": "2019-01-16T23:26:28", "url": "https://files.pythonhosted.org/packages/ab/92/6894c90330c85120d2b4fe8cdfaa78b60517320238b082fa51446b7839f5/audtekapi-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "870ddaa00ad1c724a5c5c505543955a3", "sha256": "4ef1c24f791babab1830d1e4bf60a6bc1c7ee75c76affb0efce0b83a05646af1" }, "downloads": -1, "filename": "audtekapi-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "870ddaa00ad1c724a5c5c505543955a3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8125, "upload_time": "2019-01-16T23:26:25", "url": "https://files.pythonhosted.org/packages/12/16/89dc09076e3253903b6bef80f46925430f8cca010a1b5c5d3357a59be747/audtekapi-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5e300164941fccc9176dc5ffb1bfbeea", "sha256": "df9d5bfb173e480b4e0b676ef71e73af4b68b52f9e0597f276ac246dda936323" }, "downloads": -1, "filename": "audtekapi-0.2.0.tar.gz", "has_sig": false, "md5_digest": "5e300164941fccc9176dc5ffb1bfbeea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9676, "upload_time": "2019-01-16T23:26:28", "url": "https://files.pythonhosted.org/packages/ab/92/6894c90330c85120d2b4fe8cdfaa78b60517320238b082fa51446b7839f5/audtekapi-0.2.0.tar.gz" } ] }