Friday 11 May 2018

Do you eat Domino's pizza? I have written a script that wins Domino's games to get you the biggest discount [UK]

// get-voucher.js const fetch = require('xfetch').default; const CookieJar = require('xfetch').CookieJar; (async () => { /** * Get the highest prize from Domino's Wild West Wondershot. * * @see https://ift.tt/2jRhfEg */ const jar = new CookieJar(); await fetch('https://ift.tt/2GbEVMk', { jar }); const prizes = await fetch('https://ift.tt/2jOK8Rj', { jar, responseType: 'json', headers: { referer: 'https://ift.tt/2GbEVMk' } }); console.log('prizes', prizes); const code = prizes[prizes.length - 1].unique; await fetch('https://ift.tt/2G9lKT8' + code, { jar, headers: { referer: 'https://ift.tt/2GbEVMk' } }); const response = await fetch('https://ift.tt/2KTK3Ik', { jar, headers: { referer: 'https://ift.tt/2G5kxfH' } }); const start = '
'; console.log('Voucher: ' + response.slice(response.indexOf(start) + start.length).match(/[A-Z][^<]+/)[0]); })(); To run it you need to install xfetch, i.e. npm install xfetch && node get-voucher.js.Gives you 35% off Dominos pizza.I have been using it for a long time... decided that for my own personal health's sake it is better if I share it and Domino's discontinues it. :-)

Submitted May 11, 2018 at 11:18PM by gajus0

No comments:

Post a Comment