Created
March 7, 2024 15:07
-
-
Save RobChiocchio/d7b06283ce43f713f82350df8523dad8 to your computer and use it in GitHub Desktop.
Clear unwanted games from Is There Any Deal waitlist backup file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.