{"ops":[{"insert":"Hi,\n\nI'm no coding guru by any stretch, but I like to keep my decks in a neat and tidy spreadsheet with a few data points, one of them being the price shown on Archidekt. However, with the overwhelming amount of decks I have, keeping up with this manually is a pain, so I'm wondering if there's a way to fetch that price data straight from the page to my google sheets spreadsheet?\n\nHere's the documentation I've found for it.\n\nhttps://hasdata.com/blog/google-sheets-web-scraping\n"}]}
0
{"ops":[{"insert":"This would technically be possible, but I don't think it'd work well. To the point where I don't think it'd end up working at all due to the way we throttle requests. \n\nTo get the total cost of a deck, we need to load all the cards of that deck into memory (to be able to sum the prices). Historically we've tried to avoid doing that unless absolutely necessary since it's one of the heavier operations the API can do (the only time we do is loading a deck page). \n\nSo for a spreadsheet like you're taking about, when loading the spreadsheet, it would need to do an operation we don't really allow on the site without extreme caution. That being loading N decks all at once. You'd end up hitting our spam protection filters for too many requests in a short amount of time. \n\nI'd be hesitant to lax those spam preventions in this case as well due to the relatively heavy API request this would be. \n\nSo while this kinda thing sounds really cool. I don't think I'd want to support it due to the need to have to keep too tight if a belt on users using it for it to be useful. \n\nReally cool idea though. So I'll keep it in mind if I can think of a cleaner way to accomplish it. \n"}]}
0
{"ops":[{"insert":"Oh, yeah, that puts it in a new perspective. This response is very reasonable. I guess I'll just have to carry on doing it manually ¯\\_(ツ)_/¯\n\nJust out of interest, and probably pulling something straight out of my ass, wouldn't it be possible to have decks' prices written as a variable that is only updated when a deck gets edited, and then every two weeks or so in absence of edits? That way, the lookup wouldn't be nearly as operation-intensive and API fetching of deck prices wouldn't risk bricking your servers (I think)?\n"}]}
Edited 12/10/2024, 7:18:43 PM
0