把作者归属于巴特的工具

lauteur的Python项目详细描述


travis-imglauteur==tools用于将作者归属于 懊恼 ` barthes<;http://en.wikipedia.org/wiki/death-of-u-the-author>;``uuuu

安装

pip install lauteur

测试

需要nose

nosetests

用法

lauteur有两个方法:from_stringfrom_html

from_string主要用于rss提要解析,其中作者是 有时嵌入为署名:

importlauteurstring='By: Brian Abelson ,and Michael H. Keller & Dr. Stijn Debrouwere IV'authors=lauteur.from_string(string)printauthors# ['Brian Abelson', 'Michael H Keller', 'DR Stijn Debrouwere IV']

from_html搜索作者的公共元标记。

importlauteurimportrequestsr=requests.get('http://www.nytimes.com/2013/12/20/books/michiko-kakutanis-10-favorite-books-of-2013.html')authors=lauteur.from_html(r.content)printauthors# ['Michiko Kakutani']

待办事项:

  • []查找更多元标记。
  • []改进名称格式化算法。

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

推荐PyPI第三方库


热门话题
使用applets查询的多人java游戏?   java如何基于字符串生成数组   基于java多边形的路径查找   java如何对多列ArrayList排序   java批处理更新从更新中返回了意外的行数(Spring/Hibernate)   java如何使用SeleniumWebDriver列出<tr>标记内的所有<td>   java如何使用SimpleFlatMapper将前缀为CSV的列别名到映射?   java为什么通过eclipse运行/调试TomCat时会出现ClassNotFoundException   java Android滚动视图上次视图未显示内部线性布局   替换字符串中不带空格的字符序列   调用方法时Java Swing GUI冻结   java是否允许/建议重用收集器?   在同步方法中使用java hashmap迭代器时   在java XMLDecoder XMLEncoder中写入XMLdatabase   java I无法在活动的片段中填充recyclerview   java Jitsi在调用过程中播放WAV文件如果可能,与音频混合   java JPA为什么我看到DB中每行有两个实体实例?