instapaper.com api的python库
instapaperlib的Python项目详细描述
Instapaper.com API的Python库。
用法
直接使用库:
import instapaperlib instapaperlib.auth("username", "password") instapaperlib.add_item("username", "password", "URL", "title") # with selection test set instapaperlib.add_item("username", "password", "URL", "title", "selection")
创建要使用的实例:
from instapaperlib import Instapaper i = Instapaper("username", "password") i.auth()
捕获要使用的返回代码:
from instapaperlib import Instapaper i = Instapaper("username", "password") (statuscode, statusmessage) = i.add_item("URL", "title")
同时捕获响应头:
from instapaperlib import Instapaper i = Instapaper("username", "password") (statuscode, statusmessage, title, location) = i.add_item("URL", "title", response_info=True)
或者使用cli客户端:
instapaper.py -u user -p password -t title URL
如果您在~/.instapaperrc:
中设置了用户名:passwordinstapaper.py URL
安装
通过PIP安装:
pip install instapaperlib
或者,如果您必须这样做:
easy_install instapaperlib
贡献
- 放弃回购
- 添加您的更改和测试,这样我以后不会意外中断任何内容
- 运行测试:
python instapaperlib/instapaperlib.py
- 打开拉取请求(也通过travis ci运行测试)
- 你自己高五,真了不起
元
Project: | http://github.com/mrtazz/InstapaperLibrary |
---|---|
Issues: | http://github.com/mrtazz/InstapaperLibrary/issues |
历史
0.5.1(2016-01-13)
- 修正travis.yml只在主分支上运行测试的错误配置
0.5.0(2016-01-13)
- 添加对新Instapaper API的支持
0.4.0(2010-09-06)
- 添加对jsonp的支持
- 添加对redirect=close的支持
0.3.1(2010-06-05)
- 添加doctest单元测试
- 由于新的查询方法,在auth中捕获异常
0.3.0(2010-05-24)
- 选择http/https(https标准)
- 为添加的URL设置所选内容
- 正确使用自动标题参数
- 返回响应头(内容位置,x-instapaper-title)
0.2.0(2010-05-20)
- 重新构造为python包
- PYPI兼容性
- 添加cli客户端
0.1.0(2010-05-01)
- 基本库工作
- 工作添加项