Skip to content

Instantly share code, notes, and snippets.

@lxe
Created June 12, 2025 03:08
Show Gist options
  • Save lxe/57aef900b710f8b7dab48086c49b11bf to your computer and use it in GitHub Desktop.
Save lxe/57aef900b710f8b7dab48086c49b11bf to your computer and use it in GitHub Desktop.
/* Use the browser to make signed requests to the API directly, avoiding full page reloads, saving a ton of time. Rough steps:
1. Open the _app chunk in devtools sources
2. Search for 'refreshBox' string
3. Set a breakpoint around the 'var o = n(32862);'
4. Export the 'o' local as a temp1 global var.
5. Remove the breakpoint and continue
6. Determine the starting set_no in the batch
7.Run something like this in the browser console:
(To check the range of 10002265100585 through 10002275100585):
*/
for (let i = 22651; i < 22751; i++) {
const set = '1000' + i + '00585'
const boxes = (await temp1.WY.post("/shop/v1/box/box_set/refreshBox", { set_no: set } )).box_list.map(b => b.state);
console.log('https://www.popmart.com/us/pop-now/set/195-' + set, boxes);
await new Promise(r => setTimeout(r, 1000)); // Adjust this to guard against rate limiting
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment