Skip to content

Instantly share code, notes, and snippets.

@RobChiocchio
Created March 7, 2024 15:07
Show Gist options
  • Select an option

  • Save RobChiocchio/d7b06283ce43f713f82350df8523dad8 to your computer and use it in GitHub Desktop.

Select an option

Save RobChiocchio/d7b06283ce43f713f82350df8523dad8 to your computer and use it in GitHub Desktop.
Clear unwanted games from Is There Any Deal waitlist backup file
import json
# Load JSON from file
with open('2024-03-07-1442.tksqc.waitlist.backup.json', 'r') as f:
data = json.load(f)
# Filter out entries with unwanted "added" values
data['data'] = [entry for entry in data['data']['data'][1]['games'] if entry['added'] not in [1709822337, 1709822338]]
# Write filtered data back to the file
with open('filtered_waitlist_backup.json', 'w') as f:
json.dump(data, f, indent=4)
@RobChiocchio
Copy link
Author

This needs to be modified with values to filter for. The 'added' values here represent the time at which my Steam wishlist was synced to my ITAD waitlist. The resulting file needs to be spliced into the original backup, since this filter does not preserve the preamble/formatting properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment