Wikipedia icon indicating copy to clipboard operation
Wikipedia copied to clipboard

Reading pages in a Category page?

Open hoonkai opened this issue 6 years ago • 5 comments

Hi

I'm trying to read the pages (category members) and subcategories in category "Prime Ministers of Sweden" by doing pm = wikipedia.page("Category:Prime_Ministers_of_Sweden"). However, pm.__dict__ doesn't show pages and _sections is an empty list. Also, pm.content is empty as well. Does anyone know how to read the pages and subcategories sections of a category page?

Thanks

hoonkai avatar Aug 04 '18 02:08 hoonkai

I have a similar issue, I'm wanting to read the links on a category page.

As per the wikipedia module docs:

.. note [on WikipediaPage.links property]:: Only includes articles from namespace 0, meaning no Category, User talk, or other meta-Wikipedia pages.

I can look at contributing to this module, if anyone has a hint on how links might be accessed for category pages.

alexhunsley avatar Nov 20 '18 07:11 alexhunsley

Hey @alexhunsley and @hoonkai - did you sort this issue out?

deemeetree avatar Apr 16 '19 11:04 deemeetree

Hi @deemeetree, I haven't tried this module since I had this issue. I'd like to use the module if this issue isn't occuring any more though!

alexhunsley avatar Apr 17 '19 15:04 alexhunsley

Facing the same issue here: trying to get all pages in a category but the result is an empty page. Any update?

ianbstewart avatar Jan 21 '20 15:01 ianbstewart

Any update here?

brienna avatar Nov 15 '22 23:11 brienna