> python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pitchfork
>>> p = pitchfork.search('mogwai', 'come on')
>>> p.year()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/bruno207/.local/lib/python3.5/site-packages/pitchfork/pitchfork.py", line 94, in year
year = self.soup.find(class_='year').contents[1].get_text()
File "/home/bruno207/.local/lib/python3.5/site-packages/bs4/element.py", line 730, in __getattr__
self.__class__.__name__, attr))
AttributeError: 'NavigableString' object has no attribute 'get_text'
>>>
Caught in unit testing:
https://travis-ci.org/bruno207/pitchfork/jobs/187940542#L252
Sample run: