Git Product home page Git Product logo

wikipedia-game-api's Introduction

Wikipedia Game API

Python Flask GitHub Actions

The Wikipedia Game API is an API that determines the path between two Wikipedia articles by following their links. This tool uses Breadth-First Search (BFS) to traverse through the links on Wikipedia pages, starting from a given 'start' page until it reaches the desired 'end' page. You can visualize it as the shortest path between two Wikipedia articles based purely on their links.

🌟 Features

  • πŸš€ Utilizes BFS for shortest path detection between Wikipedia articles.
  • πŸ“œ Returns a list of Wikipedia article titles that constitute the path between the starting and ending URL.
  • πŸ”₯ Easily deployable Flask application.
  • πŸ•ΈοΈ Built-in support for BeautifulSoup to parse web content.

πŸš€ API Endpoint

GET /query

Fetch the shortest path between two Wikipedia articles using their links.

Parameters:

  • start_url: The full Wikipedia URL from where the search begins.
  • end_url: The full Wikipedia URL where the search ends.

Response:

  • A list of Wikipedia article titles from start_url to end_url, representing the path.

🌐 Deployment

This API was deployed to a simple Debian server. You can try the live version of this tool at http://45.33.125.208:5000/query?start_url=[start_url]&end_url=[end_url].

πŸ’‘ How to Run Locally

  1. Clone the repository.
   git clone https://github.com/ShahRishi/wikipedia-game-api.git
   cd wikipedia-game-api
  1. Set up a virtual environment (optional)
python3 -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  1. Install the required packages.
pip install -r requirements.txt
  1. Run API
python3 app.py

wikipedia-game-api's People

Contributors

shahrishi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.