Fixing dead links/Deadlink logging app

IA Bot log is an application designed to keep track of bots which work on fixing links on the wikis. The bots will need to make an API ping every time an article is processed which logs the activity in a DB table residing on tool labs. The frontend part of the application can be accessed at: http://tools.wmflabs.org/deadlinks/.

A screenshot showing the interface of bot logger created for the purposes on Community Tech.

Here's a description of the details needed (all but the bot name are optional at the moment) in the API ping from the bot:

  • Wiki - domain name of the wiki, e.g. "en.wikipedia.org"
  • Bot - Name of the bot (string)
  • Page title - Title of the page
  • Page ID - Page ID
  • Revision ID - Revision ID of the revision where the edit was made
  • Links fixed - Number of dead links fixed in the edit
  • Links not fixed - Number of dead links that could not be fixed for one reason or another
  • Service - Service used for making the fixes (IA, Webcitation, Wikiwix, etc.)
  • Status - Status of the edit ('fixed' for fixing the links or 'posted' if the fixes were posted on the talk page and not really fixed)
  • Password - A password which authenticates the bot and logs the bot activity

The API will return "true" if the record is successfully recorded and "false" if it is not.

Code for the repository can be found at: https://github.com/Niharika29/Deadlink_logger

Example usage

edit

http://tools.wmflabs.org/deadlinks/api/?wiki=en.wikipedia.org&page=4848272&rev=708037004&numf=3&numn=1&bot=Alpha&service=IA&status=fixed&title=Donald_Trump&pass=PASSWORD (obviously not the real password)

Ouptut API

edit

The tool has an output API which bots can use to query for last edits made a specific bot on a specific page etc. It support three scenarios:

Output format

edit

In all cases, the API output contains the same parameters as the logging API does. It also contains an additional "datetime" field which indicates the timestamp at which the log was made by the bot.
Example output: {"wiki":"en.wikipedia.org", "page_id":"203", "rev_id":"1035523", "links_fixed":"4", "links_not_fixed":"4", "bot":"Beta", "service":"IA", "status":"fixed", "page_title":"Orange", "datetime":"2016-03-01 08:50:39" }