User:Gaz GEBot

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to navigation Jump to search

Automated bot account of User:Gaz Lloyd. If this bot is malfunctioning, please feel free to block it and let me know on discord (@Gaz#7521, https://discord.gg/runescapewiki).

Bot details[edit | edit source]

Gaz GEBot is written in python3 and uses async functions to fetch prices from Jagex. It runs on https://chisel.weirdgloop.org, with a status page at https://chisel.weirdgloop.org/gazproj/gazbot. Rough order of operations:

  1. Checks for a GE update by comparing the current return values of the graph API to the last values found, for a selection of items
    • If no change, wait 10 minutes and go back to step 1
  2. If there is a change, begin update procedure. Repeatedly parse Module:GEBot dump through the wiki's API to gather information.
    1. This module runs a DPL query to get all pages that are Module:Exchange/x pages
    2. For each returned title, it loads that module and grabs many pieces of information from it, including: ID, value, name, limit, alchvalue
    3. It puts all the returned values into an array and dumps that array to JSON so that the python can easily load it
    4. If this is the RSW, also run the module on the PT-BR wiki to gather the PTBR names
  3. Using the information, generate batches of tasks to fetch information from Jagex]
  4. For each task (1 item ID)
    1. Insert the prices into the data
    2. Submit the historical data to the historical data API
  5. Once all IDs have been processed, generate and edit the bulk data modules and update the bulk data API
    • The modules are only edited if the page content is changed (ignoring the timestamp change)
    • A delay before editing is inserted if one of the other GEBot processes edited recently, to prevent overloading the servers
  6. Parse each of the index templates, and submit the prices to the historical API
  7. Purge the cloudflare cache for the historical API
  8. Wait 10 minutes, then go back to step 1