algorithms_and_data_structures | 180+ Algorithm & Data Structure Problems using C++ | Learning library
kandi X-RAY | algorithms_and_data_structures Summary
kandi X-RAY | algorithms_and_data_structures Summary
180+ Algorithm & Data Structure Problems using C++
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of algorithms_and_data_structures
algorithms_and_data_structures Key Features
algorithms_and_data_structures Examples and Code Snippets
Community Discussions
Trending Discussions on algorithms_and_data_structures
QUESTION
If you open the computer science category
in wikipedia (https://en.wikipedia.org/wiki/Category:Computer_science), it displays a total of 19
subcategories (https://en.wikipedia.org/wiki/Category:Computer_science). Now, for all these 19
subcategories, if I want to extract
only the page names (the titles of pages). For example Pages in category Computer science
has 45
pages which is displayed as bullets
just below the wikipedia subcategories list. Now for all the other associated subcategories, for example the Areas of computer science
is a subcategory with 3
pages (https://en.wikipedia.org/wiki/Category:Areas_of_computer_science). But, again it has 17 sub-categories (i.e. depth 1, considering the traversal, i.e. depth = 1 means, we are 1 deep). Again, algorithm and data structures
(https://en.wikipedia.org/wiki/Category:Algorithms_and_data_structures) having 5
pages, and artificial intelligence
(https://en.wikipedia.org/wiki/Category:Artificial_intelligence) having 333
pages with some additional categories
and subcategories
spanned in multiple pages (see Pages in category "Artificial intelligence") with 37 categories and 333 pages, like this the list goes on more deeper. We are now in depth 2. What I need is to extract all the pages (titles) for the traversal with depth 1 and depth 2. Does there exist any algorithm to achieve the same?
For Example: the subcategory area of computer science is again having some (17) subcategories with a total number of pages 5+333+127+79+216+315+37+47+95+37+246+103+21+2+55+113+94 pages considering all the (17) subcategories. This is depth 2 because, I toggled twice the list. Similarly, same thing needs to be incorporated for the rest 18 subcategories (https://en.wikipedia.org/wiki/Category:Computer_science) with a depth of 2 for the base root Computer science?
Does there exist any way to achieve this? Displaying and extracting that many number of pages is difficult because it will be huge. Thus, maximum threshold of 10,000 pages would be absolutely okay.
Does there exist any way to do this? Any small help is deeply appreciated!
...ANSWER
Answered 2018-Oct-11 at 14:00There is a tool called PetScan hosted by Wikimedia labs. You can easily type the category title, then select the depth you want to reach, and then it's done!. https://petscan.wmflabs.org/
Also, see how it works https://meta.m.wikimedia.org/wiki/PetScan/en
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install algorithms_and_data_structures
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page