上传视频到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如何使用数据库中的值填充p:selectOneMenu   Java/Junit中的异步单元测试一个非常简单但不成功的例子   在Debian上使用Java连接到MySQL   java测试时如何恢复表中的一条记录/行?   java如何将重点放在jbutton上而不是放在另一个jbutton上?   java我可以从HPROF文件中获取JVM标志吗?   java如何使用自定义比较器在2个集合上保留   java让stringTokenizer将一行文本拆分为预定义变量的最佳方法是什么   Kotlin Android/Java字符串日期时间格式,API21   exchange server EWS Java Api自动发现不工作   netbeans是Java新手,似乎无法修复错误;应为类、接口或枚举。274062   我正在尝试将一些scala代码转换为Java8,以创建新的Lambda和并行集合   流中的分配api(java)   用于串行通信的java Python字节数组