{ "info": { "author": "Panagiotis Matigakis", "author_email": "pmatigakis@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Markup :: HTML" ], "description": "Topicaxis-opengraph is a fork of https://github.com/erikriver/opengraph that adds support for Python 3.\n\nOpenGraph is a module of python for parsing the Open Graph Protocol, you can read more about the specification at http://ogp.me/\n\nInstallation\n=============\n\n.. code-block:: console\n\n $ pip install topicaxis-opengraph\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\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/topicaxis/opengraph", "keywords": "opengraph protocol facebook", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "topicaxis-opengraph", "package_url": "https://pypi.org/project/topicaxis-opengraph/", "platform": "", "project_url": "https://pypi.org/project/topicaxis-opengraph/", "project_urls": { "Homepage": "https://github.com/topicaxis/opengraph" }, "release_url": "https://pypi.org/project/topicaxis-opengraph/0.5/", "requires_dist": [ "beautifulsoup4" ], "requires_python": "", "summary": "A module to parse the Open Graph Protocol", "version": "0.5" }, "last_serial": 5660049, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "863d3cd174883c63e0ce9da764650dbf", "sha256": "fc56541b5cef8737af565980263a65699ba9dcda5a2af9cbc64db8c70c536e23" }, "downloads": -1, "filename": "topicaxis_opengraph-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "863d3cd174883c63e0ce9da764650dbf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4717, "upload_time": "2019-08-10T18:49:34", "url": "https://files.pythonhosted.org/packages/0b/73/1b5efbf0fb8e626e36104523d8f985acc752f310dcb623885c5c336a5893/topicaxis_opengraph-0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a3d54fb1598210b67f432d74a58d2f9d", "sha256": "2457fce1c3a0b2d2ce540a245fdce6d7af2d5fe67501f0cb2cf50dce388048a6" }, "downloads": -1, "filename": "topicaxis-opengraph-0.5.tar.gz", "has_sig": false, "md5_digest": "a3d54fb1598210b67f432d74a58d2f9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4495, "upload_time": "2019-08-10T18:49:36", "url": "https://files.pythonhosted.org/packages/14/8c/aff1b2d2b431264fe62e3e362a4d1ed5c1a0f5a59e2032f95941bf367294/topicaxis-opengraph-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "863d3cd174883c63e0ce9da764650dbf", "sha256": "fc56541b5cef8737af565980263a65699ba9dcda5a2af9cbc64db8c70c536e23" }, "downloads": -1, "filename": "topicaxis_opengraph-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "863d3cd174883c63e0ce9da764650dbf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4717, "upload_time": "2019-08-10T18:49:34", "url": "https://files.pythonhosted.org/packages/0b/73/1b5efbf0fb8e626e36104523d8f985acc752f310dcb623885c5c336a5893/topicaxis_opengraph-0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a3d54fb1598210b67f432d74a58d2f9d", "sha256": "2457fce1c3a0b2d2ce540a245fdce6d7af2d5fe67501f0cb2cf50dce388048a6" }, "downloads": -1, "filename": "topicaxis-opengraph-0.5.tar.gz", "has_sig": false, "md5_digest": "a3d54fb1598210b67f432d74a58d2f9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4495, "upload_time": "2019-08-10T18:49:36", "url": "https://files.pythonhosted.org/packages/14/8c/aff1b2d2b431264fe62e3e362a4d1ed5c1a0f5a59e2032f95941bf367294/topicaxis-opengraph-0.5.tar.gz" } ] }