Live data from Hacker News

Reversing Safeway's private APIs to automate coupon collection

blog.jonlu.ca

81–90 of 148 posts

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

#81
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 store is able to build customer profiles using credit card numbers. The bank doesn't need to be involved at all.

Yes, it won't be perfect (especially if one uses multiple cards), but many stores are getting extremely sophisticated with their techniques for profiling customers.

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

#82
post #57
post #55

Earlier quoted context omitted.

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.

*uses jquery

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

#84

I enjoyed the article and would recommend it. Aside: At the end of the article they have a "Bonus: Speeding things up" section where they automate adding 300~ coupons via 300 HTTP connections in 5 seconds (instead of 60~ seconds). In my opinion if you're going to automate stuff like this, you should do so with the goal of minimizing disruption (and frankly, detection). They run the script automatically at midnight in…

> you should do so with the goal of minimizing disruption (and frankly, detection)

Q: If you're worried about detection, why would one blog about it/post it on HN?

Isn't the fastest way to shutdown a loophole to make it public?

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

#85

I enjoyed the article and would recommend it. Aside: At the end of the article they have a "Bonus: Speeding things up" section where they automate adding 300~ coupons via 300 HTTP connections in 5 seconds (instead of 60~ seconds). In my opinion if you're going to automate stuff like this, you should do so with the goal of minimizing disruption (and frankly, detection). They run the script automatically at midnight in…

Totally, and plus, it runs at midnight, and people aren’t going to be shopping so early in the morning... so span it over 6 hours. At least.

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

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

Yep, I do this for fun custom license plates.

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

#87
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]…

This is a great little write up, but the third bullet point should be:

- Select every button with a parent element that has the css class “grid-coupon-clip-button”

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

#88

> This brought what used to be a painstaking process of clipping coupons from magazines to a slightly less painful process of having to click “Add” on all the coupons every week after logging onto their site. This is an insane trend in supermarket usability. You want to offer low prices, but only to people who go through a practice round of online shopping before doing it in person? Why are we doing this to ourselves…

They wouldn't make as much money if everyone clipped the coupon. However, most of the time, the coupons aren't really special. The loyalty club member price is already shown on the shelf anyway. Most "coupons" are more of an advertisement for the old folks who still do that. The incentive for the actually good coupons is to get you to come into the store and buy other stuff alongside the on-sale item. If I only have a few key items on my shopping list, I might be more inclined to buy more if the coupon app shows buy one get one half off for something. Or I might buy a different brand than I normally would because there is a coupon only on the app.

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

#89

Earlier quoted context omitted.

This is not made for ordinary people I would say

Ordinary people would absolutely use an app that lives in the menu bar/system tray, has a Safeway login page and a "run on startup" option, and once a day does magic stuff in the background that adds all the available online coupons.

Right but now Safeway will update something that will cause this to break, and now people who use this super handy app will expect the maintainer to update it - even if it was just a one-off project that the original developer had no interest in maintaining.

So now people will complain and your inbox is flooded with "please fix this" because people feel entitled when all you really wanted to do was just try some cool thing.

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

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

Ok now I know to type that in any time getting gas at safeway.

Too bad? I don’t have a car

Post reply on HN