Live data from Hacker News

Reversing Safeway's private APIs to automate coupon collection

blog.jonlu.ca

111–120 of 148 posts

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

#111

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.

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.

I've been doing it for years now.

https://reserve.wanderinglabs.com/

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

#112
post #101

This reminds me of a very similar case a decade ago I never figured out. Anyone remember Coupon Guy from 4chan in the 2009/2010 timeframe? You could make your own "Buy 1 Get 1 Free" or variant (for both N, "buy 1 get 10", or for kind of coupon, like "buy 1 get half off") Tv, Xbox 360, near anything etc. For Walmart, Best Buy, other chains etc. The tools were passed around stegonographically in the instruction images.…

>> The tools were passed around stegonographically in the instruction images Whoa, really? I remember the coupons flying around 4chan of course. Had no idea the tools were in the images.

It's easy to make a file that both a valid image and a valid zip file, because zip readers start from the end-of-central-directory at EOF and most other things start from a header at the start of the file. Many such images included a winrar icon.

There might have also been some steganographic images, but I know for sure I saw several of the image+archive kind around then.

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

#113

Anyone know if the dev lurks here? I'm wondering if there's a way to fork his code or add Kroger functionality to it. If im not mistaken Kroger is a safeway acquisition that is a popular grocer in the south/southwest of the USA. this would be very helpful for those of us without safeways.

Kroger is separate company unrelated to Safeway.

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

#114
For a while I actually tried doing something like this -- the coupon page included jQuery, so a quick one-liner self-XSS clicking the right elements would iterate through all the pagination, and then you could call the click handler on all the Add buttons (which share a CSS class for styling).

The problem came at checkout -- whenever I typed in my phone number (to apply the coupons from the loyalty account), the point-of-sale system would hang for tens of seconds while loading and then trying to apply all those coupons.

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

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

One of the other benefits he mentions is that sometimes Safeway offers coupons like "Buy $20 worth of groceries, Get $2". Unless you look for and add that coupon, you'd miss out on it, with the script, it's always activated.

I also use the Safeway app, which I think is one of the better apps out there, but sometimes they add in a coupon for something free. Unless I'm looking for that, I might miss it. I'd like to modify the script to look for and notify me when it finds them.

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

#116
post #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.

Works at my local Safeway, as of yesterday. There was a period of time over a year ago during which Jenny's number didn't work at a different Safeway but it's been reliable at this one, so far.

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

#118

Earlier quoted context omitted.

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…

> ("pay-per-clip" :) You have a well-written and accurate comment, but I'm overwhelmingly distracted by the combination of the adorable "pay-per-clip" and the historied debate about how to handle an emoticon smiley at the end of a parenthetical. (conclusion: you're doing it wrong and are a terrible person!....but, "pay-per-clip"...tee-hee)

Thank you, I do my best :).

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

#119
post #73

Earlier quoted context omitted.

Given that they're probably already tracking everything via my credit card number (whether I sign up for anything or not), I don't feel like much privacy is being given up. Though as a rule I don't bother with most of these programs, mainly due to the inconvenience factor. I've lost hope of maintaining my privacy through any actions I can take individually. A legislative solution is required.

Correct me if I'm wrong, but if you're using a credit card the bank is only getting a receipt that shows the sum total of the transaction and not an itemized receipt. The club cards are consuming and tracking the data of the entire transaction.

The grocery store has access to your credit card number when you swipe it. It can associate that card (or a hash of it) with your itemized receipt.

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

#120
post #55

Earlier quoted context omitted.

what does this do exactly?

> $(".grid-coupon-clip-button button").click(); > what does this do exactly? The command allows you to click all buttons in the page at once: • The dollar sign is an alias for jQuery [1]; • The text between double quotes is a CSS selector; • Select every DOM element with a “grid-coupon-clip-button” and “button” CSS class; • The thing at the end is a JavaScript function call which triggers an “onclick” event [2]; [1]…

To be pedantic, it clicks on elements that are a button element that is the child (at any depth) of an element (of any type) that has at least the class of "grid-coupon-clip-button"
Post reply on HN