This project contains scripts for fetching auction data from the World of Warcraft game, processing it, and saving the results to a file. The scripts use the Battle.net API to retrieve auction and item price information on EU servers.
This bash script runs all the following scripts in the correct order:
- Checks if the
access_token.json
file exists, and if not, runsget_token.py
to fetch a token. - Runs
get_auctions.py
to fetch auction data. - Runs
parse_auctions_json.py
to process the data and save the results toitem_prices.txt
.
- Register an application on the Blizzard Developer Portal and obtain an API key (Client ID and Client Secret).
- Enter your Client ID and Client Secret into the
get_token.py
file'sclient_id
andclient_secret
variables. - Specify the items whose prices you want to check in the
parse_auctions_json.py
file. - Ensure that you have Python and the
requests
library installed and that you have made therun_all.sh
script executable:chmod +x run_all.sh
- Run the script:
./run_all.sh
The scripts will create the item_prices.txt
file and save the item prices in it.
Below are the descriptions of the individual scripts and instructions for running them without using run_all.sh
.
This script fetches an access token for the Battle.net API and saves it to the access_token.json
file. The token is required for API request authorization.
- Ensure you have Python installed.
- Run the script:
python3 get_token.py
This script fetches auction data from the Battle.net API and saves it to the eu_auctions.json
file. The script uses the access token from the access_token.json
file.
- Ensure you have Python installed and the
access_token.json
file with a valid token. - Run the script:
python3 get_auctions.py
This script processes data from the eu_auctions.json
file and saves the lowest item prices to the item_prices.txt
file. The script extracts item prices and names in a user-friendly format.
- Ensure you have Python installed and the
eu_auctions.json
file with current auction data. - Run the script:
python3 parse_auctions_json.py
- Python 3.x
- Python Libraries: requests (install via pip install requests)
- Internet access (to fetch data from the Battle.net API)
- The scripts assume you have an active Battle.net account and appropriate permissions to use the API.
- The access token is valid for a specific period, so it may need to be refreshed if necessary.