Skip to content

add categories attribute to Wikipedia page #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 29, 2014
Merged

Conversation

willf
Copy link

@willf willf commented Aug 18, 2014

This adds a new categories attribute to WikipediaPage, based on the similar code for links.

@goldsmith
Copy link
Owner

looks great! can you add a unit test for this so we can make sure it isn't broken with subsequent releases?

see the tests folder for style and how we mock out Mediawiki API response data.

def categories(self):
'''
List of categories of a page.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary newline

@willf
Copy link
Author

willf commented Aug 19, 2014

Ok, I added a test_categories method based on the test_links method.

@goldsmith
Copy link
Owner

looks great, thanks! now that I think about it, it also would probably make sense to strip away the 'Category:' prefix from the categories in the list before returning to the user - do you think you could make that change too?

@willf
Copy link
Author

willf commented Aug 19, 2014

Yes, I can.

On Tue, Aug 19, 2014 at 5:00 PM, Jonathan Goldsmith <
[email protected]> wrote:

looks great, thanks! now that I think about it, it also would probably
make sense to strip away the 'Category:' prefix from the categories in the
list before returning to the user - do you think you could make that change
too?


Reply to this email directly or view it on GitHub
#59 (comment).

Will

goldsmith added a commit that referenced this pull request Aug 29, 2014
add categories attribute to Wikipedia page
@goldsmith goldsmith merged commit cc36cd2 into goldsmith:master Aug 29, 2014
@goldsmith
Copy link
Owner

sorry for the delay, thanks for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants