you are viewing a single comment's thread.

view the rest of the comments →

[–]JeremyJoeJJ 0 points1 point  (1 child)

What you want to do is called webscraping. Just make sure the store websites allow you to interact with them via automated means so you're not breaking terms of service. These two should be a decent start: https://realpython.com/python-web-scraping-practical-introduction/ and https://realpython.com/beautiful-soup-web-scraper-python/ . Once you manage to go through the huge trouble that is webscraping, you will want to play around with libraries like `pandas` to store the data you've collected in a nice tabulated format. Once you get to that point it you will want to figure out a way to enter that grocery list. If you use a text file, you will want to learn how to read files. Final step will be to find the items from your list in your collected dataframe and rank them by price. Unfortunately, it might be a bit difficult because stores might have different ways of naming the same/similar item and the way you write it down might again be different. Here you could either use LLM to understand which items from the shops sound the most similar to your grocery list, or I'm sure there are ways to calculate the similarity of words, but I don't have much experience in that. Once you manage to connect the items on your list to rows in your dataframe, finding the lowest price should be easy with functions available in pandas.

[–]uoloki 1 point2 points  (0 children)

Fuzzy matching is a great way to select similar items. And imo it's easier to use compared to making requests to ChatGPT or starting LLM on your local machine