python oembed消费者库与生产者的自动发现

pyembed的Python项目详细描述


pyembed

https://secure.travis-ci.org/pyembed/pyembed.png?branch=masterhttps://coveralls.io/repos/pyembed/pyembed/badge.pnghttps://pypip.in/d/pyembed/badge.pnghttps://pypip.in/v/pyembed/badge.pnghttps://pypip.in/wheel/pyembed/badge.pnghttps://pypip.in/egg/pyembed/badge.pnghttps://pypip.in/license/pyembed/badge.png

oembed 具有 制片人。

pyembed允许您轻松地将内容从 各种制作人(包括flickr、twitter和youtube。 与许多oEmbed使用者不同,您不需要配置每个生产者 您要使用的-pyembed自动发现配置。

您只需要提供url,pyembed将生成 HTML,准备好包含在页面中:

>>> from pyembed.core import PyEmbed
>>> html = PyEmbed().embed('http://www.youtube.com/watch?v=9bZkp7q19f0')
<iframe width="480" height="270" src="http://www.youtube.com/embed/9bZkp7q19f0?feature=oembed" frameborder="0" allowfullscreen></iframe>

有一些插件可以将内容嵌入到 标记中 重新构造文本 文档,并使用 jinja2自定义嵌入 以及 胡子模板。有关详细信息,请参见pyembed网站。

兼容性

PyEmbed已经用Python2.7和3.3进行了测试。

安装

pyembed可以使用pip安装:

pip install pyembed

许可证

PyEmbed是根据麻省理工学院的许可证发行的。

Copyright (c) 2013 Matt Thomson

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何在Gomoku javafx游戏中启用回合转换   java Akka ask onComplete呼叫两次   类实现可序列化时的java NotSerializableException   java在不同情况下使用不同的Hibernate用户类型   使用Jena库从Java中的RDF网页提取URI的xml解析   即使在将github证书添加到%java_HOME%之后,java SSLHandshakeException仍然存在异常   Android Studio Java TelephonyManager错误:非静态方法   java树的23个节点浪费了什么信息?   java如何使用JAXB读取XML文件?   java Jdbc列索引超出范围   java如何在Spring忽略基本包的情况下扫描整个类路径中的组件?   用于动态创建Swing组件的java侦听器   Java方法在嵌套类中不起作用   java在JSF中使用POST而不是GET重定向异地页面   文本向txt文件添加单词列表   java如何将复选框信息从视图发送到Thymeleaf中的控制器?   用于用户提示的java字符串输入   性能java编译器能否优化循环以尽早返回?   java为什么位集不可编辑?