Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. async function sendGetRequestWithProxy(url){
  2. return new Promise(function(resolve, reject){
  3. require('request-promise') ( {
  4. url: url,
  5. rejectUnauthorized: false,
  6. //proxy: 'http://lum-customer-saulsanchez-zone-static-country-ie:geh3uaqbyld6@zproxy.lum-superproxy.io:22225',
  7. proxy: 'http://80.65.221.9:3128',
  8. //proxy: 'http://127.0.0.1:24001',
  9. headers: {
  10. 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
  11. //'Accept-Encoding': 'gzip, deflate, br',
  12. 'Accept-Language': 'en-US,en;q=0.9',
  13. 'Cache-Control': 'max-age=0',
  14. 'Connection': 'keep-alive',
  15. //'Cookie': 'aps03=lng=1&ct=197&cg=0&cst=0; pstk=D99A4ED593FB4D91AA2C3DC18BE1D957000003; Affiliates=Code=; __RequestVerificationToken_L0JldHNsaXA1=eSvQQXUQ5d0v04qwOQXg1rZi0ZJjsVZm3drNmE70NcJSIoYQa6KgAhRRm8b7AZ9pjml7fFDYgLIAD2WxGYxDyy5Vx4Y1',
  16. 'Host': 'www.bet365.com',
  17. 'Upgrade-Insecure-Requests': 1,
  18. 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3679.0 Safari/537.36'
  19. },
  20.  
  21. }).then(
  22. function(data ){
  23. return resolve(data);
  24. },
  25. function(err){
  26. return reject(err);
  27. }
  28. );
  29. });
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement