Pitchfork.com评论的非正式API

pitchfork的Python项目详细描述


用于 pitchfork.com评论。

Build StatusVersionDownloads (30 days)
Build StatusLatest VersionDownloads

安装

你可以从python package index

pip install pitchfork

您也可以克隆存储库,但请注意pitchfork依赖于 在beautifulsoup4上进行HTML解析,因此必须首先安装 beautifulsoup4你自己!!!

git clone https://github.com/michalczaplinski/pitchfork.git

用法

>>importpitchfork>>p=pitchfork.search('kanye west','my beautiful')# the title is autocompleted>>p.album()# the full album titleu'My Beautiful Dark Twisted Fantasy'>>p.label()u'Def Jam / Roc-A-Fella'>>p.editorial()[:100]# get the first 100 characters of the review.u"Kanye West's 35-minute super-video,\xa0Runaway, peaks with a parade. Fireworks flash while red hoods ma"# the link to the album cover image>>p.cover()'http://cdn4.pitchfork.com/albums/15935/homepage_large.831179e9.jpg'>>p.score()10.0# pretty overrated IMHO!

测试

您可以使用以下命令运行位于tests目录中的基本测试:

$ cd pitchfork
$ python3 -m unittest discover

许可证

麻省理工学院

贡献

如果你想增加一些新的功能,建议改进或其他什么 欢迎给我留言或发送请求!

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

推荐PyPI第三方库


热门话题
java楼梯的最大高度   java Jackson从1.7.1更新到2.8.6 JsonTypeInfo子类型反序列化   Spring WebApp中的java JPA异常处理   java在SwingWorker(doInBackground)中从WorkerThread调用多个方法?   java Android Studio构建到jar   java是添加多个按钮组的更有效方法   java MySQL JDBC连接池最大大小   java如何防止元素<Integer>变成元素<Object>   Java:处理大型XML文件提取数据而不编写状态自动机?   SpringBoot和React Web应用程序中CAS的java重定向问题   需要java算法方面的帮助吗   java在JDK 16中使用PowerMock   java异常错误本机方法签名   在Java Android中将JSON映射到数组/对象   如何打开一个窗口。java程序中的dat文件   java应用程序引擎+Maven+热插拔   java Moxy的getValueByXPath为除根元素以外的所有元素返回null