Live data from Hacker News

Reversing Safeway's private APIs to automate coupon collection

blog.jonlu.ca

51–60 of 148 posts

Re: Reversing Safeway's private APIs to automate coupon collection

#51
post #19

This is cool but I'm not sure the purpose. I use the Safeway app every time I go to Safeway. I scan all the offers and just add the ones I want, which builds a shopping list for me. This gives me a list of things to buy but more importantly I know what's on sale . If I just added all the coupons I'd still have to scan the list of things to find what I want to buy, but then I'd have to track them elsewhere, because th…

The author of the article points out that he's not really a "couponer"; he wouldn't bother with the coupons if he had to go through and look through them all. He buys what he wants to buy (decided ahead of time, not through a process of looking at the app), and his daily batch job having added all the coupons and possibly getting him a discount on the stuff he was already going to buy is just a bonus.

Re: Reversing Safeway's private APIs to automate coupon collection

#52
post #2

This is the kind of stuff where I tell people that coding can be a real practical skill (that gives you an unfair advantage these days). I did something similar (read-only) for Home Depot Truck Rentals. To check if the truck was available at my local store, each time, you had to put in your zip code, and click a couple of times. Once I found that was an API, I rebuilt the call in Postman and kept hitting that endpoin…

Exactly this. I did the same thing to find available camping spots in Hawaii because they are super difficult to get. Wrote a script that would query their "API" every 5 minutes and alert me if a spot became available anywhere.

Set something like this up for spots at Point Reyes and I'd be your first customer. Been trying for more than a year to snag a spot there.

Re: Reversing Safeway's private APIs to automate coupon collection

#53

I did something similar with Safeway's API back in the day. But rather than chew up their API with unsupported usage--CFAA case territory--I now just log into Safeway's website and issue a one-liner on the coupon page: $(".grid-coupon-clip-button button").click();

This is genius and a much more of a "hacker" way to do it... Sometimes simple is better

Re: Reversing Safeway's private APIs to automate coupon collection

#55

I did something similar with Safeway's API back in the day. But rather than chew up their API with unsupported usage--CFAA case territory--I now just log into Safeway's website and issue a one-liner on the coupon page: $(".grid-coupon-clip-button button").click();

what does this do exactly?

Re: Reversing Safeway's private APIs to automate coupon collection

#56
post #10

Another tip: (area code) 867-5309 works for Safeway club card discounts in most area codes while piping tracking of your purchases to essentially null. Yes, Jenny’s number.

I think they recently cleared this. I tried 10+ area code variants just this weekend and none worked.

Re: Reversing Safeway's private APIs to automate coupon collection

#57
post #55

I did something similar with Safeway's API back in the day. But rather than chew up their API with unsupported usage--CFAA case territory--I now just log into Safeway's website and issue a one-liner on the coupon page: $(".grid-coupon-clip-button button").click();

what does this do exactly?

Uses javascript to find all the page elements with the coupon add button styling attributes and then uses javascript to click each add button.

Re: Reversing Safeway's private APIs to automate coupon collection

#58
post #34

Earlier quoted context omitted.

Exactly this. I did the same thing to find available camping spots in Hawaii because they are super difficult to get. Wrote a script that would query their "API" every 5 minutes and alert me if a spot became available anywhere.

Have you considered whether doing this might be...wrong? Presumably those campsites are permitted by some government agency (NPS, BLM, the state of Hawaii, etc.), and presumably that agency designed permitting system with the assumption that people with limited time and attention would be vying for the permits by having to visit the site themselves to get one. This encodes a particular definition of fairness: that th…

the definition for "wrong" in this case is "what would be the social impact if everyone acted like me". In this case, I think the answer is "nothing", and that it passes the moral test (for me personally, at least).

Re: Reversing Safeway's private APIs to automate coupon collection

#59
post #55

I did something similar with Safeway's API back in the day. But rather than chew up their API with unsupported usage--CFAA case territory--I now just log into Safeway's website and issue a one-liner on the coupon page: $(".grid-coupon-clip-button button").click();

what does this do exactly?

[deleted]

Re: Reversing Safeway's private APIs to automate coupon collection

#60
post #19

This is cool but I'm not sure the purpose. I use the Safeway app every time I go to Safeway. I scan all the offers and just add the ones I want, which builds a shopping list for me. This gives me a list of things to buy but more importantly I know what's on sale . If I just added all the coupons I'd still have to scan the list of things to find what I want to buy, but then I'd have to track them elsewhere, because th…

Coupons have two purposes, which seem contrary, but are essential to understand how coupons are a form of advertising: 1) Saves you money (versus the retail price of the item) 2) Makes you more likely to buy the product on the coupon. Your use of coupons adheres to both value #1 (saves you money, because you know what's on sale) and value #2 (advertises products on sale, increasing your chances of buying them). This…

This is a great analogy. I was a little worried in writing this that it might be "ruining" a good thing, and that publishing it would kill it, but I figured enough people over time have tried to take advantage of coupon-ing (and the fact that it's inherently people trying to get deals) that it was ok.

Interesting way to compare this auto script to adblocking.

Post reply on HN