Live data from Hacker News

Reversing Safeway's private APIs to automate coupon collection

blog.jonlu.ca

21–30 of 148 posts

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

#22
post #17

When I see access to private API's like this, I wonder how judges would interpret these actions as they relate to the CFAA. By accessing "private" API's like this, are you knowingly accessing a computer without authorization? Are you exceeding your authorized access? The fact that Aaron's Law never went through has disturbed me...

I know you are just playing devil's advocate but why "without authorization"? You are using your account and your cookies so it should be fair game?

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

#23
post #22
post #17

When I see access to private API's like this, I wonder how judges would interpret these actions as they relate to the CFAA. By accessing "private" API's like this, are you knowingly accessing a computer without authorization? Are you exceeding your authorized access? The fact that Aaron's Law never went through has disturbed me...

I know you are just playing devil's advocate but why "without authorization"? You are using your account and your cookies so it should be fair game?

+1 you're only doing things you're already authorized to do, just with a different client.

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

#24
post #18

Earlier quoted context omitted.

Future of this: computer vision detector on top of frequently-updated satellite data?

Bonus points if you implement it with your own remote controlled drone.

I was going to say just mechanical turk parking lot pictures.

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

#25
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…

This is more for someone who buys what they always buy(or whatever they feel like in each instance), but doesnt want to miss out on the deal just because they didnt click the coupon.

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

#26
Is there a private API for a particular store's prices?

It seems like coupled with couponing, you can build a decent price tracker that can tell you if you're actually getting a good deal. (like https://camelcamelcamel.com/ for amazon, https://steamdb.info/sales/ for steam games)

Otherwise I've noticed that many(though not all) coupons are for items which recently had their base price increased to make the coupon seem like a better deal than you're actually saving.

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

#27
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…

You have a different objective than the author of this article, who says

> I’m not someone that “needs” to get the best deal - if what I’m buying has a coupon then great, but I’m not going to change my purchases based on coupons

The author will buy what the author will buy, and he may happen to get a discount if any coupons apply.

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

#28

Haha, I did something similar a while ago - I just invoked a click() on every "add coupon" button on their website, I didn't want to reverse engineer their APIs - way easier but also it requires a desktop browser with the page open. I'm not sure if using this API is any different but a few months ago Safeway made a change that only lets you have 20(?) coupons at any time. After you add more it kicks off your oldest o…

You can use Selenium to do the same thing in a headless browser, no need for a desktop browser with a page open. https://www.seleniumhq.org/

In which case you want to probably use their headless Docker containers. https://github.com/SeleniumHQ/docker-selenium

You can also use Puppeteer for this purpose (using headless Chrome) https://github.com/GoogleChrome/puppeteer

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

#29
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();

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

#30
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.

At risk of ya'll taking "my" safeway gas rewards, this is almost always good for whatever the maximum discount off per gallon is at any safeway that also has a gas station.
Post reply on HN