上传视频到liveleak.com

pyliveleak的Python项目详细描述


PyliveLeak

https://img.shields.io/pypi/v/pyliveleak.svghttps://img.shields.io/travis/mpenkov/pyliveleak.svgDocumentation StatusUpdates

将视频上载到liveleak.com

功能

示例用法:

$ pyliveleak --path tests/test-data/foreman_cif.mp4 --username "$username" --password "$password"
https://www.liveleak.com/view?i=7ed_1502358506

其他选项:

$ pyliveleak --help
Usage: pyliveleak [OPTIONS]

  Console script for pyliveleak.

Options:
  --loglevel INTEGER
  --password TEXT     Your liveleak.com password  [required]
  --username TEXT     Your liveleak.com username  [required]
  --path PATH         The video to upload  [required]
  --help              Show this message and exit.

您也可以将pyliveleak用作python库:

>>> import pyliveleak
>>> index_page = pyliveleak.login(username, password)
>>> file_token, item_token = index_page.add_item('tests/test-data/foreman_cif.mp4')
>>> item_token
u'b86_1502357642'

您的新视频将在这里提供:https://www.liveleak.com/view?i={item_token}

您可以指定可选元数据:

>>> index_page.add_item('tests/test-data/foreman_cif.mp4', title='my title',
...                     body='detailed description', tags='tags', category='World News')

类别必须是:

>>> pprint.pprint(sorted(pyliveleak.CATEGORIES))
['afghanistan',
 'citizen journalism',
 'conspiracy',
 'creative',
 'history',
 'hobbies',
 'iran',
 'iraq',
 'liveleak challenges',
 'liveleaks',
 'music',
 'nature',
 'other',
 'other entertainment',
 'other items from liveleakers',
 'other middle east',
 'other news',
 'politics',
 'propaganda',
 'regional news',
 'religion',
 'science and technology',
 'sports',
 'syria',
 'ukraine',
 'vehicles',
 'weapons',
 'world news',
 'wtf',
 'yawn',
 'your say']

学分

这个包是用Cookiecutteraudreyr/cookiecutter-pypackage项目模板创建的。

历史记录

0.1.2(2017-08-11)

已修复
  • 在包数据中包含categories.yml(和version),这次是实时的。

0.1.1(2017-08-10)

已添加

  • 更多Sphinx文档

已修复

  • 在包数据中包含categories.yml。
  • 更新sphinx版本,以便正确构建文档。

0.1.0(2017-08-10)

  • pypi上的第一个版本。

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

推荐PyPI第三方库


热门话题
java如何修复无法解析从未使用过的符号和变量的错误   java lucene搜索   java无法获取可用的提供程序解析程序   java问题使用引发SAXException的方法编译类   是否可以编辑抽象类?JAVA   java AppletViewer出现错误并试图加入计时器   基于java JNI的Android库,在没有NDK的情况下使用   Java如何使用Jenkins中的环境变量?   XMLHttpRequestJavaJavaScript   JPA实体中的java枚举类型字段   java泛型方法将一种枚举类型转换为另一种枚举类型   java Liveconnect小程序问题   java SpringBoost应用程序和Apache Ignite配置:启动ApplicationContext时出现问题   反射从Java8中的类对象获取方法引用   调试时Eclipse在java 8类加载器上中断