{ "info": { "author": "Chason Chaffin", "author_email": "chason@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries" ], "description": "=================\npyzu \ud83d\udc0d\u56f3\n=================\n\n.. image:: https://coveralls.io/repos/github/chason/pyzu/badge.svg?branch=master\n :target: https://coveralls.io/github/chason/pyzu?branch=master\n\n.. image:: https://travis-ci.org/chason/pyzu.svg?branch=master\n :target: https://travis-ci.org/chason/pyzu\n\n.. image:: https://badge.fury.io/py/pyzu.svg\n :target: https://badge.fury.io/py/pyzu\n\n\nA Python class for retrieving `Open Graph`_ metadata from a website.\n\nOverview\n----------\n\nThere's a fair number of Open Graph metadata libraries for Python, but all of\nthe currently active ones use an HTML parser like BeautifulSoup to extract the\nmetadata. There's nothing wrong with that, and it comes with some advantages\nbut I wanted one that parses the webpage as RDFa, and so here we are.\n\nThis library extracts the Open Graph metadata and makes it available via the\nobject's properties. Most of the other libraries I've encountered that do this\ntake a website's URI and download the data there but this library takes the\ntext of the website as the data instead. This was done because I've found that\nvarious websites like to hide their OGM data behind user agents so this allows\nyou to get the data however you need to. It is also much easier to test.\n\nSee the TODO.rst file for information about features that I will be adding to\nthis library.\n\nBasic Usage\n---------------\n\nYou can get the website source any way you like but in these examples I will be\nusing Requests_.\n\nFirst initialize the object with the data from Requests::\n\n import requests\n from pyzu import OGP\n\n r = requests.get('http://ogp.me/')\n ogp_me = OGP(r.text)\n\nAfter this we can check the validity of the data (essentially does it contain\nthe four required attributes as specified by the `OGP spec`_ [title, type,\nimage, and url]::\n\n >>> ogp_me.is_valid\n True\n\nand finally we can look at the properties individually or see all the properties\nthat we were able to extract from the page::\n\n >>> ogp_me.title\n 'Open Graph protocol'\n >>> ogp_me.properties\n ['description', 'url', 'image:height', 'image:alt', 'type', 'image', 'image:width', 'title', 'image:type']\n\n\n.. _Open Graph: http://ogp.me/\n.. _Requests: http://docs.python-requests.org/en/master/\n.. _OGP spec: http://ogp.me/#metadata\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/chason/pyzu", "keywords": "opengraph opengraph-data rdfa rdflib", "license": "", "maintainer": "", "maintainer_email": "", "name": "pyzu", "package_url": "https://pypi.org/project/pyzu/", "platform": "", "project_url": "https://pypi.org/project/pyzu/", "project_urls": { "Homepage": "https://github.com/chason/pyzu" }, "release_url": "https://pypi.org/project/pyzu/0.1.4/", "requires_dist": [ "requests", "rdflib", "html5lib", "bumpversion; extra == 'dev'", "black; extra == 'dev'", "pytest (>=3.5); extra == 'test'", "coverage; extra == 'test'", "coveralls; extra == 'test'", "pytest-cov; extra == 'test'", "pytest-mypy; extra == 'test'", "pytest-flake8; extra == 'test'" ], "requires_python": ">=3.6", "summary": "Library to work with Open Graph metadata", "version": "0.1.4" }, "last_serial": 4171433, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "cba7f421eb6a9eab16fc41cbcbd5ff1b", "sha256": "39708025a26782c7a5d75c7a2aab728aedc4c59107732f055ca642c24b0ba468" }, "downloads": -1, "filename": "pyzu-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cba7f421eb6a9eab16fc41cbcbd5ff1b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 2215, "upload_time": "2018-08-02T05:11:52", "url": "https://files.pythonhosted.org/packages/5d/f0/c0a22ec6f177e1257235883b930bca7c9bcec1bb404868125ae33d41de88/pyzu-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fad34b6ecb232e4e7d754c27dd92af57", "sha256": "c86de9eb9145a6e7c84044f4d7c4fbcecb4ef25b296e4070fc5961ef362b31cb" }, "downloads": -1, "filename": "pyzu-0.1.tar.gz", "has_sig": false, "md5_digest": "fad34b6ecb232e4e7d754c27dd92af57", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 2469, "upload_time": "2018-08-02T05:11:53", "url": "https://files.pythonhosted.org/packages/e0/c7/ae5d0959f9ef55449b67f03816023f94296af768a06887de7876480eda74/pyzu-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a41003d826229cb79912af4835785979", "sha256": "a4a4756e3271e362ae623888ed21f82d3f61a8d43975b4c70063d6bf26f9975d" }, "downloads": -1, "filename": "pyzu-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a41003d826229cb79912af4835785979", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 2353, "upload_time": "2018-08-14T08:22:35", "url": "https://files.pythonhosted.org/packages/48/1e/e2bb526093f37a87fd93193939c7f6bdf53c97bbbdda2dd7dec6cd4bd618/pyzu-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c7f5b43521375848119f223d959b54ba", "sha256": "a7f203477925fe2c717c747abccdb740afe2c04a342ce6ad4e54addd6c385855" }, "downloads": -1, "filename": "pyzu-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c7f5b43521375848119f223d959b54ba", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3469, "upload_time": "2018-08-14T08:22:36", "url": "https://files.pythonhosted.org/packages/c2/12/bcc1addbd01dee2b2146b2757f4beb942cfc1bebedfdd1a346b341e3555d/pyzu-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2bf7bce229dec43f43dfc77a56395822", "sha256": "17a7fb4bdae2ed943931423d3ed7a64afb1caac8230894a077e1de17c06a78fe" }, "downloads": -1, "filename": "pyzu-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "2bf7bce229dec43f43dfc77a56395822", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 2356, "upload_time": "2018-08-14T08:34:00", "url": "https://files.pythonhosted.org/packages/d4/7d/95deab4356f51e525d49e1b08f3247bdf393e91816189611285edfdf7556/pyzu-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6e7792bfe5970cda183531d5de572251", "sha256": "a9d7348ab419338e8b2be2b8603e82ed61babb8c89b88e1f964f5181a2837193" }, "downloads": -1, "filename": "pyzu-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6e7792bfe5970cda183531d5de572251", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 2826, "upload_time": "2018-08-14T08:34:01", "url": "https://files.pythonhosted.org/packages/19/c3/96d4b9e600e142bdb768469b42f13ae9974eb6cab3c120fd1bf715024c0b/pyzu-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "d47b0b193657f883cad4618d0a116a77", "sha256": "f72a1a1a0008d45759ce9ec0b84761f754be78b98bd34980a006f309adcae716" }, "downloads": -1, "filename": "pyzu-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "d47b0b193657f883cad4618d0a116a77", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 3171, "upload_time": "2018-08-14T08:48:39", "url": "https://files.pythonhosted.org/packages/bf/af/cb6d1ea4a606cc546f9142690231d396eb145e00be1036100b3cac784d4b/pyzu-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "31dacbfa39895a6427936d931b91fe09", "sha256": "bf768e1f844b38ead0643d921e8af74bbbadebbac8b62df32419719476a21fef" }, "downloads": -1, "filename": "pyzu-0.1.3.tar.gz", "has_sig": false, "md5_digest": "31dacbfa39895a6427936d931b91fe09", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 2832, "upload_time": "2018-08-14T08:48:41", "url": "https://files.pythonhosted.org/packages/63/a0/9d5e9869034ecc32be524168cfe313bacacb2b6ed218d7c00c9e64aab592/pyzu-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "962969f80f3046dacdfff4dff40feaf7", "sha256": "04cab8d7031053a853bc9f84aaa756c6c4d35d00d45e6adeba908e82d89ffe5b" }, "downloads": -1, "filename": "pyzu-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "962969f80f3046dacdfff4dff40feaf7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4873, "upload_time": "2018-08-15T01:35:10", "url": "https://files.pythonhosted.org/packages/69/23/b1b8e219642b1d276e5804376e9c2c961c704e7b782001f90d8dbc423731/pyzu-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "744251cc7f6e8eb641caba8832da6dda", "sha256": "2da09e1f62f213a5e7e1566b403c4db25280b947b37182df810fa9b19905d041" }, "downloads": -1, "filename": "pyzu-0.1.4.tar.gz", "has_sig": false, "md5_digest": "744251cc7f6e8eb641caba8832da6dda", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3907, "upload_time": "2018-08-15T01:35:11", "url": "https://files.pythonhosted.org/packages/38/ae/07d4b96979f5b9cd8e94a284b2f8c138be5033ce71f63bf4d9e4c31b2308/pyzu-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "962969f80f3046dacdfff4dff40feaf7", "sha256": "04cab8d7031053a853bc9f84aaa756c6c4d35d00d45e6adeba908e82d89ffe5b" }, "downloads": -1, "filename": "pyzu-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "962969f80f3046dacdfff4dff40feaf7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4873, "upload_time": "2018-08-15T01:35:10", "url": "https://files.pythonhosted.org/packages/69/23/b1b8e219642b1d276e5804376e9c2c961c704e7b782001f90d8dbc423731/pyzu-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "744251cc7f6e8eb641caba8832da6dda", "sha256": "2da09e1f62f213a5e7e1566b403c4db25280b947b37182df810fa9b19905d041" }, "downloads": -1, "filename": "pyzu-0.1.4.tar.gz", "has_sig": false, "md5_digest": "744251cc7f6e8eb641caba8832da6dda", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3907, "upload_time": "2018-08-15T01:35:11", "url": "https://files.pythonhosted.org/packages/38/ae/07d4b96979f5b9cd8e94a284b2f8c138be5033ce71f63bf4d9e4c31b2308/pyzu-0.1.4.tar.gz" } ] }