用于向已知oembed提供程序发送的实用程序
oembedders的Python项目详细描述
oEmbedders
oEmbedders是围绕python-oembed和oembed provider registry设置oEmbed使用者的一个小包装,该使用者使用所有已知的 提供者。
安装
pip install oembedders
使用量
fromoembeddersimportembede=embed('https://www.youtube.com/watch?v=dQw4w9WgXcQ')
您也可以从命令行使用它:
oembedders https://www.youtube.com/watch?v=dQw4w9WgXcQ
{
"author_url": "https://www.youtube.com/user/RickAstleyVEVO",
"title": "Rick Astley - Never Gonna Give You Up (Video)",
"thumbnail_width": 480,
"html": "<iframe width=\"480\" height=\"270\" src=\"https://www.youtube.com/embed/dQw4w9WgXcQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
"type": "video",
"thumbnail_url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
"version": "1.0",
"author_name": "RickAstleyVEVO",
"provider_url": "https://www.youtube.com/",
"width": 480,
"provider_name": "YouTube",
"thumbnail_height": 360,
"height": 270
}
提供者
提供程序注册表数据在iamcal/oembed中维护。可以更新 在oEmbedders中的任何时候,提供的makefile将下载 最新的数据并将其放置到位,以便提交。