Skip to content

(Deprecated) A multi-threaded Python script that finds the shortest path between two Wikipedia articles

Notifications You must be signed in to change notification settings

scottenriquez/wiki-depth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wiki-depth

A multithreaded Python script that finds the shortest path between two Wikipedia articles. It's powered by Goldsmith's Python-wrapped Wikipedia API and written using Python 3.9. I wanted to experiment with the Wikipedia API in a meaningful way, however this is a quick project that I don't have any intention of expanding or maintaining.

To run the scripts, simply clone the repo and use the following command:
python wiki_depth.py < input_file.in > output.out

The input file accepts lines of type:
"Start Page" "Target Page" Where "Start Page" and "End Page" are valid titles of Wikipedia articles. There is no error checking to make sure that these pages are valid.

Note that if a large number of the HTTP requests begin to fail, try reducing the number of threads by changing the global variable MAX_THREADS.

About

(Deprecated) A multi-threaded Python script that finds the shortest path between two Wikipedia articles

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages