Live data from Hacker News

I had to build a web scraper to buy groceries

utkuufuk.com

81–90 of 175 posts

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

#81

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.

Kudos to the developers at Walmart Labs. They clearly know their stuff.

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

#82

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.

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 think).

So it's not enforced, but it is preferable.

---

[1] pre-corvid-crisis

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

#83
post #58

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.

In Bulgaria between 8.30 and 10.30 shops are open for the elderly only. I'm not sure how effective this is but it strikes me as a good low tech move.

Same is Slovakia. When looking on handling the covid spread, it seems that generally central/east european countries are doing surprisingly good job compared to western europe, which is rather clueless and is paying/will a rather pay high price for this incompetence.

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

#84

It seems like a lot of demand issues highlighted by the pandemic could be solved by queues. Instead of saying "there are no slots available", put the user in the queue. Process the queue in order. The improvement in wait time and demand accuracy would be a win for both consumers and the business.

Ocado in the UK do exactly this, using queue-it [0].

On some sites, apparently queue-jumping is as simple as disabling javascript (n.b. Ocado [1] have been in the game longer than most, and this does not work on their site).

[0] https://queue-it.com/ [1] https://ocado.queue-it.net/

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

#85

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.

I agree; however, a plea to young people on HN is much less effective than having it as a company policy. They could reserve some/most/all spots for seniors.

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

#86
post #14

Earlier quoted context omitted.

38% of the people hospitalized with COVID-19 are between 20 and 54. [1] Everyone can catch the illness, everyone can wind up in the hospital, and depending on the state of the local hospitals, everyone is in immediate danger. [1] https://www.msn.com/en-ca/health/medical/close-to-40percent-...

That 38% figure is not relevent in this context, because it does not control for the demographics of the population in general. 45% of admisions are over 65, despite the fact that >65 makes up only 16% of the total population [0]. Further, according the the underlying report, of the 22-44 year olds admitted to the hospital, only 2-4% went to the ICU. The 75–84 bracket had 11%–31% admitance to the ICU. Of the deaths r…

So you get to decide that risking death for a 70 year old is worse than risking permanent lung damage for a 30 year old?

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

#87
post #82

Earlier quoted context omitted.

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.

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.

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

#88

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.

I find this is is equally a pain in the arse though. In normal times, I add stuff to my cart throughout the week then at the weekend top it off and book a delivery.

Ocado in the UK has the best model in my experience - allowing you to reserve a delivery slot before shopping if you want, but not enforcing this. Unfortunately they have also been the worst-affected from a surge in customers from a technical standpoint and were bordering on unusable for a week.

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

#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

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

#90

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.

Not giving you it to young people prevents them from giving it to vulnerable people further down the road.

If 1 person infects 10 prevention of one transmission can save a 1000.

Everyone ought to do curbside pick up or delivery for everything.

Post reply on HN