marklagendijk / node-toogoodtogo-watcher

Node.js cli tool for monitoring your favorite TooGoodToGo businesses. Docker image available.
MIT License
363 stars 116 forks source link

Add Datadome Configuration procedure to Readme file #231

Open Juanma24- opened 1 year ago

Juanma24- commented 1 year ago

Would it be useful to add the procedure to complete header {"Cookie": } to the Readme file?

Something like (sorry if there are some errors, I am not very familiar with the procedure):

After login procedure, a TooGoodToGo Token must be generated following this procedure:

  1. Go to TooGoodToGo Token Refresh in a web browser (no smartphone).
  2. Open Developer Tools/network
  3. Refresh the page
  4. Click on message with the following properties:
  1. Copy datadome value under Cookie header
  2. Paste it as follows as in the following example:
    "headers": {
    "User-Agent": "TooGoodToGo/23.3.10 (550) (iPhone/iPhone 11 (GSM); iOS 16.3.1; Scale/2.00)",
    "Cookie": "datadome=2auLQNidCsqFN74ooGd8aToNCUAnI8-IK0Ho76fPaLYVVU4ontJsz28eT3_jZ9vcJXDLtOP-x9Vy1ULORBFHa70rf~MvlsHYolTpACw9gYh4RIXDbU9cuM-DlqJOQ9-y"
    }, 
arnolicious commented 1 year ago

Only getting a 405 "Method not allowed" when visiting on a Browser? That can't be the correct way to do this, or is it?

sebastianklein96 commented 1 year ago

@arnolicious it actually is correct. You will still see an attempt to download the favicon.ico which should contain the datadome token. If you don't see the cookie header on that request, look in the session storage of your browser (Firefox: F12, Tab web storage, cookies, toogoodtogo entry).

arnolicious commented 1 year ago

Well for me that never worked, what did now work was this:

The Value actually gets set there, so this must be the valid one.

francorg commented 9 months ago
  1. Copy datadome value under Cookie header

sorry for the noob question: do I have to copy the datadome value in the "Request headers" section or in the "Response headers" one?

Thank you, Roberto