Giter VIP home page Giter VIP logo

Comments (8)

foo-git avatar foo-git commented on September 14, 2024

I don't know any API endpoint, sorry.
However, if an official REWE app exists which is able to query stores/products, maybe you can use the approach mentioned in #8 (comment)?

from rewe-discounts.

foo-git avatar foo-git commented on September 14, 2024

I just found an article which describes the quest for the Rewe API, including some urls, maybe that helps.

from rewe-discounts.

McLamy avatar McLamy commented on September 14, 2024

Hey @lukaskawerau,
I found an API Access today. For example: "https://shop.rewe.de/api/products/?search="
It gives you a JSON back ;)
But I have a problem with the API: I'm more a Frontend Dev so I dont know if this is a glitch or a security feature.
I'm interested in sorting the products by its "basePrice" (price per kg). When I access the API via Webclient I can see the basePrices. But if make a request with my python script the part of the JSON is empty. Any ideas why this is happening? Thanks in advance

from rewe-discounts.

McLamy avatar McLamy commented on September 14, 2024

Found the solution myself: The request needs a search param or a market param. So when adding &market=1940130 to the URL (with the search param) I get all the details 😎

from rewe-discounts.

foo-git avatar foo-git commented on September 14, 2024

See #16, maybe it helps as well:

So i had previously issues with cloudflare errors (see solves issues). The temporary fix was to just downgrade the cloudscraper version thus it's probably not a long term fix.

Therefore i did some rewe api research and found out that "https://www.rewe.de/api/all-stationary-offers/ + market_id" gives you a list of product ids which are currently in discount. If you remove the unnessacery stuff u get a raw list of ids. Then just simply loop through the list and everytime call https://www.rewe.de/api/offer-details/' + id + '?wwIdent=' + market_id. Append the result to a list and you get a total list with all products and very much detail.

Just wanted to let you guys now. This API doesnt seem like its affected by the issue. Ofcoure this method is not as elegant as before and it takes bit longer, but since you run this script once a week it doesent realy matter.

from rewe-discounts.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.