User:Gaz GEBot
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:
- 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
- If there is a change, begin update procedure. Repeatedly parse Module:GEBot dump through the wiki's API to gather information.
- This module runs a DPL query to get all pages that are Module:Exchange/x pages
- For each returned title, it loads that module and grabs many pieces of information from it, including: ID, value, name, limit, alchvalue
- It puts all the returned values into an array and dumps that array to JSON so that the python can easily load it
- If this is the RSW, also run the module on the PT-BR wiki to gather the PTBR names
- Using the information, generate batches of tasks to fetch information from Jagex]
- For each task (1 item ID)
- Insert the prices into the data
- Submit the historical data to the historical data API
- 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
- Parse each of the index templates, and submit the prices to the historical API
- Purge the cloudflare cache for the historical API
- Wait 10 minutes, then go back to step 1