Live data from Hacker News

I had to build a web scraper to buy groceries

utkuufuk.com

91–100 of 175 posts

Re: I had to build a web scraper to buy groceries

#91
post #24

Young healthy people shouldn’t be doing this, the slots should go to the ill and elderly, people who are in immediate danger from catching the illness.

How not-young must one be to be legitimate in taking steps like this to avoid contracting this potentially fatal illness? I’m not yet 40. I have bought all of my food online and had it delivered for years now. Should I now begin exposing myself to the infection risks posed by going inside a grocery store? This may sound like snark but it’s not. I’m curious about the opinions of people who feel this way.

Are you otherwise healthy? If so and if you find almost every food delivery slot taken then I would say yes, you should be doing your grocery shopping in person. It's not a huge burden to change your behaviours for other people's benefit especially if others also do the same.

Re: I had to build a web scraper to buy groceries

#92
I've done the same thing in The Netherlands, as I'm doing the shopping for my grandparents. I noticed that I don't need it yet, but I did see that I might need it in the future since I need to stay awake until 23:59 at night, so I can snatch a slot at 00:00 at the most famous supermarket here.

My script isn't fully ready, but it's 75% complete and I'll complete the final 25% when I really do need it.

Also, these things are quite easy to make, so I expect a lot of techies to eventually do this.

Re: I had to build a web scraper to buy groceries

#93

Of all the grocery companies in my area, only Walmart has it right: Choose an available pick up time, then start online shopping. All the others let you fill your cart, then at checkout tell you there are no slots available until the end of time. Waste of time, energy, and hope. F U, Target, Safeway, Albertsons, and Kroger.

That's insane. All the online grocery shops here in the UK work that way (pick slot first then pick items). There are still no slots at all available anywhere for either delivery or collection though.

Care to give some examples?

I live in the UK and most of the online stores let you pick the delivery slot after filling the basket, which is an infuriatingly poor UX, given the current circumstances.

Re: I had to build a web scraper to buy groceries

#94

Of all the grocery companies in my area, only Walmart has it right: Choose an available pick up time, then start online shopping. All the others let you fill your cart, then at checkout tell you there are no slots available until the end of time. Waste of time, energy, and hope. F U, Target, Safeway, Albertsons, and Kroger.

That's insane. All the online grocery shops here in the UK work that way (pick slot first then pick items). There are still no slots at all available anywhere for either delivery or collection though.

No, it's quite sensible to do the basket first. If your slot is not available just wait a day or two and try again with the same basket. The vast majority of people have more than enough for a week in their cupboards and do not need to book right now.

Ocado has slots for existing customers. They took a while to get it right but they now have limits on orders per week and show you slots for the next few days. If they are empty just try again later and your basket is still there. I had a delivery a couple of days ago.

I hope not too many people try to subvert systems like this with a script to grab slots, because they're just contributing to the problem.

Re: I had to build a web scraper to buy groceries

#95
post #30
post #7

Earlier quoted context omitted.

Web queues are ineffective as shown by sneaker bots. You’d need actual ID style authentication of accounts. If you’re talking about order queues than people will stuff the queue and cancel their orders or just have more hoarding if their multiple deliveries get processed. If it’s FIFO same technical advantages will apply: bots can click much faster than humans ever will. I think the issue is more human nature and thi…

>Web queues are ineffective as shown by sneaker bots. You’d need actual ID style authentication of accounts. ...and that's rendered ineffective by SaaS bot companies that take your account logins and payment details and places the orders on your behalf, for a fee of course[1]. The economically efficient solution would be to auction off the slots, so at least the grocer is reaping the profit rather than some third par…

You are solving the wrong problem. Curbside pick up is about as safe as delivery for 1/3 the labor cost and the grocer already has enough people if he uses everyone.

A food delivery auction would in some segments drive up the cost drastically when some can least afford it fuelling panic. This panic would fuel buying and hoarding.

Meanwhile the poor flock to the shelves to buy before the rich can pay to have it all delivered for hoarding.

Surge pricing for groceries during a crisis may be one of the worse ideas I've seen on hacker news.

Re: I had to build a web scraper to buy groceries

#96
post #66

Earlier quoted context omitted.

FWIW, Save-On-Foods does this as well.

Save-On-Foods has another - different issue. They normally let you modify orders, which is great. However I've noticed that modifying when there are no additional available time slots for your post code does not work. Your time slot stays reserved however upon trying to check out you will get told that they do not deliver to your area. Eventually new slots opened up and I could update my order but a frustrating bug a…

Did you let them know?

Re: I had to build a web scraper to buy groceries

#97
post #89

Tips: the first session cookie is probably returned if you do a GET on the homepage of the website, so you can simplify your script by Declaring the requests session, doing get on the homepage and then doing get on the endpoint It will also prevent issue with session expiration

Hey do you have any suggested readings on how to better understand these structures and your reasoning?

Re: I had to build a web scraper to buy groceries

#98
post #87
post #82

Earlier quoted context omitted.

Not quite. Ocado[1] (who I use almost exclusively), lets you fill the basket full of food, and then when you pick a slot, it tells you what's out of stock for that delivery slot, letting you pick alternates if available. However, the 'correct' way is to pick the slot first, as that way you can see what's out of stock as you shop - this does put you on a time limit though, as the slot can only be held for 1 hour (I th…

I’m not sure how crows are related to this but it made me laugh ;) The click-and-collect as well as delivery shops are all like this around here. Terrible experience, even without COVID.

It was early, not sure I was awake enough to type tbh. XD

Re: I had to build a web scraper to buy groceries

#99

Young healthy people shouldn’t be doing this, the slots should go to the ill and elderly, people who are in immediate danger from catching the illness.

Actually, it depends on where do you live. In OP's country elder people have been given rights to call social services and even police to get their shopping done. Other than that, in Turkey family relations are similar to Italy: the old people and younglings usually live together. So there is always a risk to get the disease in the market and then pass it to an elder back at home. OP's doing the right thing keeping his head down and order online.

Re: I had to build a web scraper to buy groceries

#100
post #18

Earlier quoted context omitted.

In store: you need to have someone stock the shelves, someone walk through the store and pick groceries, and someone handle the payment in person. Chance of infection: depends how long since someone coughed in the store. Online: you need someone to stock the orders and wait for people to drive up for curbside pickup. Chance of infection: low. Surely the second option is both safer and more efficient?

Probably different regions but none of my grocery stores do online like that. They have someone walk the aisles and shop like a regular shopper, and check-out at the cash register like a regular shopper. They will even give you their receipt to verify the order. You're just offloading the risk of infection to someone being paid to grab groceries.

Think of the systemic effects. If everyone ordered online, fewer shoppers would go to the stores, changing the topology of infection from a mesh to a star. Spokes would likely develop immunity, and would be less surface area to test, if we had any tests /s

edit: not star, hub and spoke, sorry

Post reply on HN