Skip to content

Players start on the same randomly selected article and must navigate to another pre-selected article (home) only use links within the current article. The goal is to arrive at the home article in the fewest number of links or the least time.

Notifications You must be signed in to change notification settings

valexharo/wiki_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

wiki_game

Players start on the same randomly selected article and must navigate to another pre-selected article (home) only use links within the current article. The goal is to arrive at the home article in the fewest number of links or the least time.

The solution uses the BeautifulSoup library to perform webscraping of the links in web pages and graphs to find the paths between the links

The main function receives 3 parameters: start URL, target URL and a maximum number of links to visit and returns an object containing the links found between the given entries.

For example, to find the links between:

Start: "https://en.wikipedia.org/wiki/Fyodor_Dostoyevsky" End: "https://en.wikipedia.org/wiki/Medieval"

And analyze maximum 500 links, use the function as follows:

wikiGame (start, end, 500).

About

Players start on the same randomly selected article and must navigate to another pre-selected article (home) only use links within the current article. The goal is to arrive at the home article in the fewest number of links or the least time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages