{ "info": { "author": "Jaeseo Park", "author_email": "jaeseopark@icloud.com", "bugtrack_url": null, "classifiers": [ "Natural Language :: English", "Programming Language :: Python :: 3" ], "description": "# nicoclient\n\n[![Build Status](https://travis-ci.com/jaeseopark/nicoclient.svg?branch=master)](https://travis-ci.com/jaeseopark/nicoclient) ![Coveralls github](https://img.shields.io/coveralls/github/jaeseopark/nicoclient.svg) ![PyPI](https://img.shields.io/pypi/v/nicoclient.svg)\n\nA python client to interact with [nicovideo.jp](https://nicovideo.jp).\n\n## Installation\n\n```bash\npip install nicoclient\n```\n\n## Features\n\n### Get metadata\n\n```python\nmetadata = nicoclient.get_metadata('sm34734479')\nprint(json.dumps(metadata, indent=2, ensure_ascii=False))\n```\n\n```json\n{\n \"id\": \"sm34734479\",\n \"views\": 3033,\n \"likes\": 163,\n \"thumbnail_url\": \"http://tn.smilevideo.jp/smile?i=34734479.81262\",\n \"title\": \"\u51fa\u6765\u308b\u3060\u3051\u611f\u60c5\u7684\u306b\u300c\u30d8\u30a4\u30c8\u30af\u30e9\u30a4\u30e0\u300d\u3092\u6b4c\u3044\u307e\u3057\u305f\u3002\",\n \"uploader_id\": \"33765098\",\n \"tags\": [\n \"\u6b4c\u3063\u3066\u307f\u305f\",\n \"\u30d8\u30a4\u30c8\u30af\u30e9\u30a4\u30e0(\u3055\u307e\u3050\u3089)\",\n \"\u3055\u307e\u3050\u3089\",\n \"\u6a80\u4e0a\u5927\u7a7a\",\n \"\u307f\u3051\uff08\u6b4c\u3044\u624b\uff09\",\n \"\u3066\u3066\u3066\",\n \"\u30dc\u30ab\u30ed\u30aa\u30ea\u30b8\u30ca\u30eb\u3092\u6b4c\u3063\u3066\u307f\u305f\"\n ],\n \"description\": \"\u6700\u5f8c\u307e\u3067\u8074\u3044\u3066\u3082\u3089\u3048\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\u3002\u7d20\u6674\u3089\u3057\u3044\u539f\u66f2 sm33841308MIX\u3000\u307f\u3051\u3000mylist/58924781\u3000https://twitter.com/rnike_san \u6b4c\u3000\u3066\u3066\u3066\u3000mylist/41403147\u3000https://twitter.com/tetete2525\"\n}\n```\n\n### Get trending videos\n\n```python\nvideos = nicoclient.get_trending_videos()\nfor video in videos:\n print(f\"'{video['id']}' has {video['views']} views and {video['likes']} likes\")\n\n# 'sm34658459' has 40057 views and 1293 likes\n# 'sm34248511' has 278194 views and 14274 likes\n# 'sm34676260' has 96529 views and 6554 likes\n# ...\n```\n\n### Get videos in a playlist\n\n```python\nvideos = nicoclient.get_videos_by_playlist_id('58924781')\nfor video in videos:\n print(f\"'{video['id']}' has {video['views']} views and {video['likes']} likes\")\n\n# 'sm29118726' has 1104 views and 28 likes\n# 'sm29299741' has 837 views and 19 likes\n# 'sm29816849' has 1476 views and 32 likes\n# ...\n```\n\n### Get related videos\n\n#### Use case 1\n\nIf the video is a Vocaloid Original, then the function returns Utattemita videos.\n\n```python\nrelated_videos = nicoclient.get_related_videos('sm32076378')\nprint('\\n'.join([v['title'] for v in related_videos]))\n\n# \"\u30c9\u30e9\u30de\u30c4\u30eb\u30ae\u30fc \u6b4c\u3063\u3066\u307f\u305f\u3010\u308a\u3076\u3011\",\n# \"\u30c9\u30e9\u30de\u30c4\u30eb\u30ae\u30fc\u3000\u6b4c\u3063\u3066\u307f\u305f\u3010\u305d\u3089\u308b\u3011\",\n# \"\u3010\u30a6\u30a9\u30eb\u30d4\u30b9\u793e\u3011\u30c9\u30e9\u30de\u30c4\u30eb\u30ae\u30fc\u3092\u6b4c\u3063\u3066\u307f\u307e\u3057\u305f\u3010\u63d0\u4f9b\u3011\",\n# \"\u3010\u6d66\u5cf6\u5742\u7530\u8239\u6b4c\u3063\u3066\u307f\u305f\u30c4\u30a2\u30fc\u3011\u30c9\u30e9\u30de\u30c4\u30eb\u30ae\u30fc\u3010\u3046\u3089\u305f\u306c\u304d\u3011\",\n# \"\u3010\u723d\u5feb\u306b\u3011\u30c9\u30e9\u30de\u30c4\u30eb\u30ae\u30fc \u6b4c\u3063\u3066\u307f\u305f ver.Sou\",\n# \"\u300e\u30c9\u30e9\u30de\u30c4\u30eb\u30ae\u30fc\u300f\u3092 \u6b4c\u3063\u3066\u307f\u305f\u3002by\u5929\u6708\",\n# ...\n```\n\n#### Use case 2\n\nIf the video is _NOT_ a Vocaloid Original, then the function returns other videos by the uploader.\n\n```python\nrelated_videos = nicoclient.get_related_videos('sm32103696')\nprint('\\n'.join([v['title'] for v in related_videos]))\n\n# \"Marygold \u6b4c\u3063\u3066\u307f\u305f\u3010\u308a\u3076\u3011\",\n# \"\u6c99\u4e0a\u306e\u5922\u55b0\u3044\u5c11\u5973 \u6b4c\u3063\u3066\u307f\u305f\u3010\u308a\u3076\u3011\",\n# \"BEAUTIFUL DREAMER \u6b4c\u3063\u3066\u307f\u305f\u3010\u308a\u3076\u3011\",\n# \"\u591c\u3068\u8679\u8272 \u6b4c\u3063\u3066\u307f\u305f\u3010\u308a\u3076\u3011\",\n# \"Starduster \u6b4c\u3063\u3066\u307f\u305f\u3010\u308a\u3076\u3011\",\n# \"\u30d4\u30a8\u30ed \u6b4c\u3063\u3066\u307f\u305f\u3010\u308a\u3076\u3011\",\n# ...\n```\n\n\n", "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/lekordable/nicoclient", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "nicoclient", "package_url": "https://pypi.org/project/nicoclient/", "platform": "", "project_url": "https://pypi.org/project/nicoclient/", "project_urls": { "Homepage": "https://github.com/lekordable/nicoclient" }, "release_url": "https://pypi.org/project/nicoclient/1.1.0/", "requires_dist": [ "requests", "beautifulsoup4" ], "requires_python": "", "summary": "A python client to interact with nicovideo.jp", "version": "1.1.0" }, "last_serial": 5658519, "releases": { "1.1.0": [ { "comment_text": "", "digests": { "md5": "9e5d448c9e28b0a31b087ccb6904cfb8", "sha256": "967729a2d8f357ad2e3a53c2d9e61ecef187d79dd31024b59fb578be94f10ebb" }, "downloads": -1, "filename": "nicoclient-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9e5d448c9e28b0a31b087ccb6904cfb8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12677, "upload_time": "2019-08-10T04:05:04", "url": "https://files.pythonhosted.org/packages/cb/72/df182cca11f59bd27b862a26655a38aad7e02d4c886d029e96eef7e2ad33/nicoclient-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "869fdbb66fca5185bf4aab8dfef063b3", "sha256": "fcfb2a7c87d3ddc30f14caeb79d0cefd616ef92089f857792764c5b7094af872" }, "downloads": -1, "filename": "nicoclient-1.1.0.tar.gz", "has_sig": false, "md5_digest": "869fdbb66fca5185bf4aab8dfef063b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 262373, "upload_time": "2019-08-10T04:05:07", "url": "https://files.pythonhosted.org/packages/f7/51/9ebbeb516ff262e37be41ad119b666da40a62cebc295000479c928700cd7/nicoclient-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9e5d448c9e28b0a31b087ccb6904cfb8", "sha256": "967729a2d8f357ad2e3a53c2d9e61ecef187d79dd31024b59fb578be94f10ebb" }, "downloads": -1, "filename": "nicoclient-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9e5d448c9e28b0a31b087ccb6904cfb8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12677, "upload_time": "2019-08-10T04:05:04", "url": "https://files.pythonhosted.org/packages/cb/72/df182cca11f59bd27b862a26655a38aad7e02d4c886d029e96eef7e2ad33/nicoclient-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "869fdbb66fca5185bf4aab8dfef063b3", "sha256": "fcfb2a7c87d3ddc30f14caeb79d0cefd616ef92089f857792764c5b7094af872" }, "downloads": -1, "filename": "nicoclient-1.1.0.tar.gz", "has_sig": false, "md5_digest": "869fdbb66fca5185bf4aab8dfef063b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 262373, "upload_time": "2019-08-10T04:05:07", "url": "https://files.pythonhosted.org/packages/f7/51/9ebbeb516ff262e37be41ad119b666da40a62cebc295000479c928700cd7/nicoclient-1.1.0.tar.gz" } ] }