{ "info": { "author": "Erik Rivera", "author_email": "erik.river@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Markup :: HTML" ], "description": "OpenGraph is a module of python for parsing the Open Graph Protocol, you can read more about the specification at http://ogp.me/\n\nNote : This repository has only porting related changes and was basically created to make these changes available on PyPi.\n\nInstallation\n=============\n\n.. code-block:: console\n\n $ pip install opengraph-py3.6\n\nFeatures\n=============\n\n* Use it as a python dict\n* Input and parsing from a specific url\n* Input and parsung from html previous extracted\n* HTML output\n* JSON output\n\nUsage\n==============\n\n**From an URL**\n\n.. code-block:: pycon\n\n >>> import opengraph\n >>> video = opengraph.OpenGraph(url=\"http://www.youtube.com/watch?v=q3ixBmDzylQ\")\n >>> video.is_valid()\n True\n >>> for x,y in video.items():\n ... print \"%-15s => %s\" % (x, y)\n ...\n site_name => YouTube\n description => Eric Clapton and Paul McCartney perform George Harrison's \"While My Guitar Gently Weeps\" at the...\n title => While My Guitar Gently Weeps\n url => http://www.youtube.com/watch?v=q3ixBmDzylQ\n image => http://i2.ytimg.com/vi/q3ixBmDzylQ/default.jpg\n video:type => application/x-shockwave-flash\n video:height => 224\n video => http://www.youtube.com/v/q3ixBmDzylQ?version=3&autohide=1\n video:width => 398\n type => video\n\n**From HTML**\n\n.. code-block:: pycon\n\n >>> HTML = \"\"\"\n ... \n ... \n ... The Rock (1996)\n ... \n ... \n ... \n ... \n ... \n ... \n ... \"\"\"\n >>> movie = opengraph.OpenGraph() # or you can instantiate as follows: opengraph.OpenGraph(html=HTML)\n >>> movie.parser(HTML)\n >>> video.is_valid()\n True\n\n**Generate JSON or HTML**\n\n.. code-block:: pycon\n\n >>> ogp = opengraph.OpenGraph(\"http://ogp.me/\")\n >>> print ogp.to_json()\n {\"image:type\": \"image/png\", \"title\": \"Open Graph protocol\", \"url\": \"http://ogp.me/\", \"image\": \"http://ogp.me/logo.png\", \"scrape\": false, \"_url\": \"http://ogp.me/\", \"image:height\": \"300\", \"type\": \"website\", \"image:width\": \"300\", \"description\": \"The Open Graph protocol enables any web page to become a rich object in a social graph.\"}\n >>> print ogp.to_html()\n\n \n \n \n \n \n \n \n \n \n \n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/erikriver/opengraph", "keywords": "opengraph protocol facebook", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "opengraph_py3", "package_url": "https://pypi.org/project/opengraph_py3/", "platform": "", "project_url": "https://pypi.org/project/opengraph_py3/", "project_urls": { "Homepage": "https://github.com/erikriver/opengraph" }, "release_url": "https://pypi.org/project/opengraph_py3/0.71/", "requires_dist": null, "requires_python": "", "summary": "A module to parse the Open Graph Protocol. Ported to Python3.6 using 2to3-3.6", "version": "0.71" }, "last_serial": 3621355, "releases": { "0.71": [ { "comment_text": "", "digests": { "md5": "2f9f1da4c11dbf3f13bf3c4e91660f34", "sha256": "4ae982cc02fceda9b47fa3e4e860aebc387210bc153c7328e76a1c85ccc94d1c" }, "downloads": -1, "filename": "opengraph_py3-0.71.tar.gz", "has_sig": false, "md5_digest": "2f9f1da4c11dbf3f13bf3c4e91660f34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4282, "upload_time": "2018-02-27T11:52:58", "url": "https://files.pythonhosted.org/packages/28/a5/b3c3c9f07251fdf2370593bc5a79c71715b46cdf528adb54dc38014cd95b/opengraph_py3-0.71.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2f9f1da4c11dbf3f13bf3c4e91660f34", "sha256": "4ae982cc02fceda9b47fa3e4e860aebc387210bc153c7328e76a1c85ccc94d1c" }, "downloads": -1, "filename": "opengraph_py3-0.71.tar.gz", "has_sig": false, "md5_digest": "2f9f1da4c11dbf3f13bf3c4e91660f34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4282, "upload_time": "2018-02-27T11:52:58", "url": "https://files.pythonhosted.org/packages/28/a5/b3c3c9f07251fdf2370593bc5a79c71715b46cdf528adb54dc38014cd95b/opengraph_py3-0.71.tar.gz" } ] }