An OSRS price wiki client
Provide an API for the OSRS price wiki at https://oldschool.runescape.wiki/w/RuneScape:Real-time_Prices that behaves nicely by default -- requiring a descriptive User-Agent, not abusing their servers, and strongly typing the responses.
python -m pip install -e git+https://github.com/hmusgrave/pwiki.git#egg=pwiki
import asyncio
from pwiki.client import Client
async def main():
async with Client('price exploration -- [email protected]') as client:
mapping = await client.mapping()
whip = next(x for x in mapping if x.name == 'Abyssal whip')
last_whip_trades = await client.latest(item = whip.item)
print(last_whip_trades)
asyncio.run(main())
Contributions welcome. I'll check back on this repo at least once per month.