Skip to content

Commit

Permalink
v1.4 featuring WikipediaPage.categories
Browse files Browse the repository at this point in the history
  • Loading branch information
goldsmith committed Nov 15, 2014
1 parent cc36cd2 commit 96854a4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Current

## Version 1.4

* Test wikipdia library on Python v3.4. PR [#52](https://github.com/goldsmith/Wikipedia/pull/52) by [frewsxcv](https://github.com/frewsxcv)
* Add WikipediaPage.categories attribute. PR [#59](https://github.com/goldsmith/Wikipedia/pull/59) by [@willf](https://github.com/willf)

### Version 1.3.1

* Determine package version without importing ``wikipedia`` in setup.py. Fixes [#50](https://github.com/goldsmith/Wikipedia/issues/50) reported by [@arcolife](https://github.com/arcolife)
Expand Down
2 changes: 1 addition & 1 deletion wikipedia/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .wikipedia import *
from .exceptions import *

__version__ = (1, 3, 1)
__version__ = (1, 4, 0)
3 changes: 1 addition & 2 deletions wikipedia/wikipedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,11 +619,10 @@ def links(self):
def categories(self):
'''
List of categories of a page.
'''

if not getattr(self, '_categories', False):
self._categories = [re.sub("^Category:","",x) for x in
self._categories = [re.sub(r'^Category:', '', x) for x in
[link['title']
for link in self.__continued_query({
'prop': 'categories',
Expand Down

0 comments on commit 96854a4

Please sign in to comment.