{ "info": { "author": "Loftie Ellis", "author_email": "pyunfurl@unfurl.dev", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": "# PyUnfurl\n\nPyUnfurl is a Python library for embedding ('unfurling') content from other sites into your own site, similar to the way slack expands links. \nUseful for easily embedding tweets, YouTube videos, StackOverflow posts or content from any other site.\n\n### Features\n* Supports all oEmbed providers from [https://oembed.com/](https://oembed.com/) and [https://noembed.com/](https://noembed.com/) by default.\n* Supports the [autodiscovery](https://oembed.com/#section4) part of the oEmbed spec.\n* Support for [Open Graph](https://ogp.me/) protocol.\n* Support for [Twitter Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards.html)\n* Falls back to Meta tags and the site favicon/title if all else fails.\n\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install pyunfurl.\n\n```bash\npip install pyunfurl\n```\n\n## Usage\n\n```python\nimport pyunfurl\npyunfurl.unfurl('https://www.youtube.com/watch?v=aBr2kKAHN6M') \n```\nThis will return a dict similar to the oembed spec:\n```\n{\n\t'method': 'oembed', # one of 'oembed', 'twitter_card', 'open_graph', 'meta_tags', 'custom'\n\t'site': 'YouTube', \n\t'domain': 'youtube.com', \n\t'title': 'Live Views of Starman', \n\t'description': '', \n\t'image': '', \n\t'favicon': '', # only included if no image was found \n\t'url': 'https://www.youtube.com/watch?v=aBr2kKAHN6M', \n\t'type': 'rich', \n\t'html': '\\n\\n'\n}\n```\nYou can use the `html` entry to directly include the content on your site.\n\n## Styling\nFor non oembed content (eg OpenGraph entries such as StackOverflow) PyUnfurl returns a html structure like the following:\n```\npyunfurl.unfurl('https://stackoverflow.com/questions/509211/understanding-slice-notation')['html']\n```\n```\n
\n \n \n \n
\n Understanding slice notation\n
I need a good explanation (references are a plus) on Python's slice notation. \nTo me, this notation needs a bit of picking up. \nIt looks extremely powerful, but I haven't quite got my head around...
\n stackoverflow.com\n
\n
\n\n```\nYou can style this any way you want, a good starting point is to include the following css on your site:\n```\n div.unfurl{\n font-family: helvetica, arial, sans-serif;\n font-size:15px;\n border:1px solid #ebebeb;\n border-radius: 8px;\n display:flex;\n align-items: center;\n text-align: left;\n }\n div.unfurl img {\n width: 120px;\n background-color: #ebebeb;\n }\n div.unfurl-favicon img {\n width: 80px;\n padding:20px;\n background-color: #ebebeb;\n }\n div.unfurl-content a{\n color:black;\n display: inline-block;\n font-weight: bold;\n text-decoration: none;\n line-height:30px;\n text-overflow: ellipsis;\n overflow: hidden;\n min-width: 10px;\n white-space: nowrap;\n width:100%;\n }\n div.unfurl-content a.unfurl-domain{\n color:gray;\n font-weight: normal;\n }\n div.unfurl-content{\n flex:1;\n margin-left:10px;\n margin-right:10px;\n min-width: 10px;\n width:100%;\n }\n div.unfurl-content div{\n line-height:18px;\n max-height:54px;\n overflow:hidden;\n }\n```\nThis will generate a card looking like:\n\n![img](https://i.imgur.com/1CMJjJq.png)\n\n## Contributing\nPull requests are welcome. PyUnfurl supports some custom integrations for sites that doesnt return any meta tags, if you want to improve the integration for a specific site you can look at the hackernews example.\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\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/lpellis/pyunfurl", "keywords": "", "license": "License :: OSI Approved :: MIT License", "maintainer": "", "maintainer_email": "", "name": "pyunfurl", "package_url": "https://pypi.org/project/pyunfurl/", "platform": "", "project_url": "https://pypi.org/project/pyunfurl/", "project_urls": { "Homepage": "https://github.com/lpellis/pyunfurl" }, "release_url": "https://pypi.org/project/pyunfurl/0.1.4/", "requires_dist": [ "pyquery", "requests", "uritools", "micawber" ], "requires_python": ">=3.6", "summary": "library for embedding ('unfurling') content from other sites into your own site", "version": "0.1.4" }, "last_serial": 5626860, "releases": { "0.0.0.1": [ { "comment_text": "", "digests": { "md5": "b1c7ef4d36571f6262753288f8d6ec69", "sha256": "065f5d43fa25c9f52a7205445106d607211e98a5e8c614d46dcfe60b4559196f" }, "downloads": -1, "filename": "pyunfurl-0.0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b1c7ef4d36571f6262753288f8d6ec69", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 2743, "upload_time": "2019-07-28T16:32:24", "url": "https://files.pythonhosted.org/packages/1d/65/6f29f348a0a659dfd4196f5ed32e06ca4bdaf5b4a0f1b19c3ec60b6851a6/pyunfurl-0.0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e31881f222a92adbfc1431928528fa80", "sha256": "a8271a72446a3c695eb0cb42a51953fa9d566f99b77df2e7317a884bc90e7104" }, "downloads": -1, "filename": "pyunfurl-0.0.0.1.tar.gz", "has_sig": false, "md5_digest": "e31881f222a92adbfc1431928528fa80", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 2647, "upload_time": "2019-07-28T16:32:28", "url": "https://files.pythonhosted.org/packages/e8/f5/2822f4f7ceda80a25c5b5dd3cee64806d212a8619b0dd223b3891b99f638/pyunfurl-0.0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "09a26148c0bc98666ee5478ea11a6ec7", "sha256": "1a2fc0981fa2a39e492b8ff26ae20f05501fb7eb2ed9181a4221b575d532ca5c" }, "downloads": -1, "filename": "pyunfurl-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "09a26148c0bc98666ee5478ea11a6ec7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 16218, "upload_time": "2019-07-28T16:32:27", "url": "https://files.pythonhosted.org/packages/32/4f/29690416b78204354b139a26caa0738f99aba1aca7f8821eae9da57a110e/pyunfurl-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "512f94bedd7c40cab198f6d622cf210c", "sha256": "5d6c132107d5a2ff08215683b70d7e6f081f583b8791dc87051e5eb34b1519fe" }, "downloads": -1, "filename": "pyunfurl-0.1.0.tar.gz", "has_sig": false, "md5_digest": "512f94bedd7c40cab198f6d622cf210c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 17964, "upload_time": "2019-07-28T16:32:30", "url": "https://files.pythonhosted.org/packages/50/9e/cc0e6f3f3261fce7f5ceb11e79e29c550aa35b7b0bdf279b9e0f642588e3/pyunfurl-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "83f772d451b72a27102753abcc0380fd", "sha256": "70ba051f403d0d47eb8a19936f537735feab4fe10b4c728a525fa0498f2960c0" }, "downloads": -1, "filename": "pyunfurl-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "83f772d451b72a27102753abcc0380fd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 16990, "upload_time": "2019-07-28T23:53:27", "url": "https://files.pythonhosted.org/packages/82/7a/7a8eb6a29de7670fcc29d80e5536a432e9b8a499c3951aaa08c67a5ec04a/pyunfurl-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6332e9514a5539de498040d0e9bc0d88", "sha256": "fef9c7d125adebd3768d4f2bfb4a0af04621fd806b3acaecbe8dde5a596857a5" }, "downloads": -1, "filename": "pyunfurl-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6332e9514a5539de498040d0e9bc0d88", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 17976, "upload_time": "2019-07-28T23:53:30", "url": "https://files.pythonhosted.org/packages/fb/b9/90b82358d6ed2868910b09d708471e1f15b317f15f8de59a9d4aebeabbc1/pyunfurl-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "e48eebf2d462fccc503d4ae6ec4cc5a8", "sha256": "0467e740d978ecb1d894d8a63b7e26709d0989f7769e3da70a0fd51e3842f522" }, "downloads": -1, "filename": "pyunfurl-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "e48eebf2d462fccc503d4ae6ec4cc5a8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 16981, "upload_time": "2019-07-29T00:45:52", "url": "https://files.pythonhosted.org/packages/e0/76/8b4a11534d08af3b4fe03f4fbebd9335331db14451633dc834f6d63ec239/pyunfurl-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d02c9a887104467f4e5b969cb8d317b1", "sha256": "7b253abca5c2bde73db1d97a377b8c9354b495bc459d0ad3a97e64cc84f7038a" }, "downloads": -1, "filename": "pyunfurl-0.1.2.tar.gz", "has_sig": false, "md5_digest": "d02c9a887104467f4e5b969cb8d317b1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 17974, "upload_time": "2019-07-29T00:45:57", "url": "https://files.pythonhosted.org/packages/65/ac/02de29aeb291f24b88341316c638a304ad1b9c3106f84b1e7e9048a83fe8/pyunfurl-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7cd3ad63c9310148d7329ba9ab6c357d", "sha256": "386e53f2cc1697520ce5159634f1aa43103976f385fe9ea2b7aa78648fd186bf" }, "downloads": -1, "filename": "pyunfurl-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7cd3ad63c9310148d7329ba9ab6c357d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 17029, "upload_time": "2019-08-02T16:01:31", "url": "https://files.pythonhosted.org/packages/31/e9/9d9d7997f8fcd357bd9fa5292edcb9d6997abc01c899e3d7007c9425cb21/pyunfurl-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4e40e59f59a71c829a3d49d4f59c608", "sha256": "77482ddcd178d9eb294fb62f70d8a11a0a6ac975f40eba75c3dd54f71eb7126f" }, "downloads": -1, "filename": "pyunfurl-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b4e40e59f59a71c829a3d49d4f59c608", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 18018, "upload_time": "2019-08-02T16:01:38", "url": "https://files.pythonhosted.org/packages/ac/71/eeca2bcb3f5a37dd44069741f926848f6c0b0b38e6687e431a4afa1132fb/pyunfurl-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "82304628bfd32f37b81d308d526751d6", "sha256": "3ca23c5893a728d44eb30767868a562f636838566559233907501babb875ff6f" }, "downloads": -1, "filename": "pyunfurl-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "82304628bfd32f37b81d308d526751d6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 17033, "upload_time": "2019-08-03T00:11:37", "url": "https://files.pythonhosted.org/packages/bb/b6/8c2c43628dfdc55183b319f25d54fc6cdb3220173e5c8608b1612c8f3cf4/pyunfurl-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8adcbaf9f3af0d643cdf452f16cf7020", "sha256": "b29047dc557470d9c9b3b5cef209be5d295bae51669f1830bd570e9b200a7c56" }, "downloads": -1, "filename": "pyunfurl-0.1.4.tar.gz", "has_sig": false, "md5_digest": "8adcbaf9f3af0d643cdf452f16cf7020", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 18022, "upload_time": "2019-08-03T00:11:46", "url": "https://files.pythonhosted.org/packages/cb/fa/4e2ee31042e9b96709fd643ce6197675e17ffe6f2a4831145db908528181/pyunfurl-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "82304628bfd32f37b81d308d526751d6", "sha256": "3ca23c5893a728d44eb30767868a562f636838566559233907501babb875ff6f" }, "downloads": -1, "filename": "pyunfurl-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "82304628bfd32f37b81d308d526751d6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 17033, "upload_time": "2019-08-03T00:11:37", "url": "https://files.pythonhosted.org/packages/bb/b6/8c2c43628dfdc55183b319f25d54fc6cdb3220173e5c8608b1612c8f3cf4/pyunfurl-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8adcbaf9f3af0d643cdf452f16cf7020", "sha256": "b29047dc557470d9c9b3b5cef209be5d295bae51669f1830bd570e9b200a7c56" }, "downloads": -1, "filename": "pyunfurl-0.1.4.tar.gz", "has_sig": false, "md5_digest": "8adcbaf9f3af0d643cdf452f16cf7020", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 18022, "upload_time": "2019-08-03T00:11:46", "url": "https://files.pythonhosted.org/packages/cb/fa/4e2ee31042e9b96709fd643ce6197675e17ffe6f2a4831145db908528181/pyunfurl-0.1.4.tar.gz" } ] }