{ "info": { "author": "sashgorokhov", "author_email": "sashgorokhov@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "python-ninegag\n**************\n\n.. image:: https://travis-ci.org/sashgorokhov/python-ninegag.svg?branch=master\n :target: https://travis-ci.org/sashgorokhov/python-ninegag\n \n.. image:: https://badge.fury.io/py/python-ninegag.svg\n :target: https://badge.fury.io/py/python-ninegag\n\nPython library to get stuff from 9gag.com\n\nInstallation\n============\n\nVia pip:\n\n.. code-block:: shell\n\n pip install python-ninegag\n\nUsage\n=====\n\n.. code-block:: python\n\n pyninegag.get_sections()\n\nReturns dict of 9gag sections, where keys are capitalized sections names, and values are their urls.\n\nExample output:\n\n.. code-block:: python\n\n {'Fresh': 'http://9gag.com/fresh',\n 'Cute Animals': 'http://9gag.com/cute',\n 'Comic': 'http://9gag.com/comic',\n 'Food': 'http://9gag.com/food',\n 'GIF': 'http://9gag.com/gif',\n 'Cosplay': 'http://9gag.com/cosplay',\n 'Geeky': 'http://9gag.com/geeky',\n 'Girl': 'http://9gag.com/girl',\n 'Funny': 'http://9gag.com/funny',\n 'Design': 'http://9gag.com/design',\n 'WTF': 'http://9gag.com/wtf',\n 'NSFW': 'http://9gag.com/nsfw',\n 'Trending': 'http://9gag.com/trending',\n 'Timely': 'http://9gag.com/timely',\n 'Meme': 'http://9gag.com/meme',\n 'Hot': 'http://9gag.com/hot'\n }\n\nNOTE: NSFW section will return zero articles (empty iterable) since watching this section requires user login, which is not supported by this library.\n\nThese values are not hardcoded and will be generated on first request. Values are cached.\n\n.. code-block:: python\n\n pyninegag.get_articles(url, max_pages=1)\n\nReturn iterable with all articles found on given url.\n``max_pages`` - how many pages of results to parse. If None - all available. Default 1 - only first page.\n\n.. code-block:: python\n\n pyninegag.get_articles(pyninegag.BASE_URL)\n\nWill return all articles on main 9gag page.\n\nExample output:\n\n.. code-block:: python\n\n [\n {\n 'id': 'a1MEzz6',\n 'title': 'Jumping into the abyss',\n 'data': {\n 'type': 'gif',\n 'url': 'http://img-9gag-fun.9cache.com/photo/a1MEzz6_460sa.gif'\n },\n 'comments': '163',\n 'votes': '10709',\n 'url': 'http://9gag.com/gag/a1MEzz6'\n },\n {\n 'id': 'agVEP3g',\n 'title': 'Made of crab',\n 'data': {\n 'type': 'image',\n 'url': 'http://img-9gag-fun.9cache.com/photo/agVEP3g_700b_v1.jpg'\n },\n 'comments': '257',\n 'votes': '10053',\n 'url': 'http://9gag.com/gag/agVEP3g'\n }\n ]\n\nArticle type can be one of gif, image or longpost. Longpost is just a very tall image.\n\n.. code-block:: python\n\n pyninegag.get_by_section(section_name, max_pages=1)\n\nReturn iterable with all articles found in given section. Section name must be one of the keys of ``pyninegag.get_sections()``. If not found, ``ValueError`` will be raised.\n\nThere is also a logger ``pyninegag`` enabled that logs exceptions and warnings of parsing errors. All errors contain article id and url in message for easier debugging of problems.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/sashgorokhov/python-ninegag/archive/master.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sashgorokhov/python-ninegag", "keywords": "ninegag,9gag", "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "python-ninegag", "package_url": "https://pypi.org/project/python-ninegag/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python-ninegag/", "project_urls": { "Download": "https://github.com/sashgorokhov/python-ninegag/archive/master.zip", "Homepage": "https://github.com/sashgorokhov/python-ninegag" }, "release_url": "https://pypi.org/project/python-ninegag/1.0/", "requires_dist": null, "requires_python": null, "summary": "Python library to get stuff from 9gag.com", "version": "1.0" }, "last_serial": 2113850, "releases": { "0.3.1": [ { "comment_text": "", "digests": { "md5": "ec39297bc8860e05a746b24db3075e8a", "sha256": "1eda8dfbcdfb1de8140582c2fc5f64af644ca3a904a7c518d289f828268b692e" }, "downloads": -1, "filename": "python-ninegag-0.3.1.zip", "has_sig": false, "md5_digest": "ec39297bc8860e05a746b24db3075e8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4625, "upload_time": "2016-04-01T19:53:16", "url": "https://files.pythonhosted.org/packages/16/6b/55a3cb062d768c95090137e0f899d0765eca3cd81fdb1e31ff538b100b48/python-ninegag-0.3.1.zip" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "5e7ae4c77eb91484017ab8a0ac8797fa", "sha256": "41292bc1e879b7e810c3f37750e0378179c377c72d5bacd93aee53928ad7a79c" }, "downloads": -1, "filename": "python-ninegag-0.3.2.tar.gz", "has_sig": false, "md5_digest": "5e7ae4c77eb91484017ab8a0ac8797fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3227, "upload_time": "2016-04-08T08:12:54", "url": "https://files.pythonhosted.org/packages/de/30/26e02ce969be147e90cd50c7f47df2b6707f4fa9275b8cc9e9c5801e6bca/python-ninegag-0.3.2.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "c834b3f1fc5021a13f1413f30558421e", "sha256": "ef4f0c10920a12ef1c43b67168f83bdb6ac78fa0a4f38e7e0b3d19fa5f084be9" }, "downloads": -1, "filename": "python-ninegag-0.4.tar.gz", "has_sig": false, "md5_digest": "c834b3f1fc5021a13f1413f30558421e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3537, "upload_time": "2016-04-08T09:23:01", "url": "https://files.pythonhosted.org/packages/af/e5/614b1af191f1b205c55688bf0c94c477f0ad8dc5c20b3b6bb5711453962b/python-ninegag-0.4.tar.gz" } ], "0.4.2": [], "0.5": [ { "comment_text": "", "digests": { "md5": "cc9b8c7d002b9d40447f94becd233fdc", "sha256": "660e33b31ed8ccca8fb801682c192894d251a3c1ee3577f859df1232e7999887" }, "downloads": -1, "filename": "python-ninegag-0.5.zip", "has_sig": false, "md5_digest": "cc9b8c7d002b9d40447f94becd233fdc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5470, "upload_time": "2016-04-16T15:41:47", "url": "https://files.pythonhosted.org/packages/fd/a9/194b7cd24c59cef631140b1fa23199b9c408dc8d29364fc5640f38cacc26/python-ninegag-0.5.zip" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "c73cde04c73fb35444c494541d158c50", "sha256": "f7c818add86211bb10492e45ea84e3f1dd3214b254eb64801f25188dd23e61ac" }, "downloads": -1, "filename": "python-ninegag-1.0.zip", "has_sig": false, "md5_digest": "c73cde04c73fb35444c494541d158c50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5451, "upload_time": "2016-05-13T08:35:49", "url": "https://files.pythonhosted.org/packages/90/b8/dfe3d4119c7c007754f6a3189349cfdadcf54d680483383fa3a6f012485e/python-ninegag-1.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c73cde04c73fb35444c494541d158c50", "sha256": "f7c818add86211bb10492e45ea84e3f1dd3214b254eb64801f25188dd23e61ac" }, "downloads": -1, "filename": "python-ninegag-1.0.zip", "has_sig": false, "md5_digest": "c73cde04c73fb35444c494541d158c50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5451, "upload_time": "2016-05-13T08:35:49", "url": "https://files.pythonhosted.org/packages/90/b8/dfe3d4119c7c007754f6a3189349cfdadcf54d680483383fa3a6f012485e/python-ninegag-1.0.zip" } ] }