Unofficial API for pitchfork.com reviews, maintained version of pitchfork
Project description
pitchfork
An unofficial python API for
pitchfork.com <http://www.pitchfork.com>
__ reviews.
+------------------+--------------------+-----------------------+ | Build Status | Version | Downloads (30 days) | +==================+====================+=======================+ | |Build Status| | |Latest Version| | |Downloads| | +------------------+--------------------+-----------------------+
Installation
You can get it from python package index <https://pypi.python.org/pypi>
__:
.. code:: sh
pip install pitchfork
You can also clone the repository, but note that pitchfork
depends
on beautifulsoup4
for HTML parsing so you first have to install
beautifulsoup4
yourself !!!
.. code:: sh
git clone https://github.com/michalczaplinski/pitchfork.git
Usage
.. code:: python
>> import pitchfork
>> p = pitchfork.search('kanye west', 'my beautiful') # the title is autocompleted
>> p.album() # the full album title
u'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
Tests
You can run the basic tests located in the tests
directory with:
.. code:: sh
$ cd pitchfork
$ python3 -m unittest discover
License
MIT
Contributions
If you want to add some new feature, suggest improvement or whatnot you're welcome to message me or send a pull request!
.. |Build Status| image:: https://travis-ci.org/tejassharma96/pitchfork_api.svg?branch=master :target: https://travis-ci.org/tejassharma96/pitchfork_api .. |Latest Version| image:: https://pypip.in/v/pitchfork/badge.png :target: https://pypi.python.org/pypi/pitchfork/ .. |Downloads| image:: https://pypip.in/download/pitchfork/badge.png :target: https://pypi.python.org/pypi/pitchfork/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pitchfork_api-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1194d6e44fac0a76c36afff0d26c6911e8ba8d19fc093a7ba58d22a6d73fe3c |
|
MD5 | d505c0eeb65676bed511b3623614b924 |
|
BLAKE2b-256 | 9ead28e0b77f4bdf188142d8df1cb48f73ca05b105a3ee80b6ef99b3de11bab8 |