Guest User

Untitled

a guest
Dec 18th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. const fs = require('fs');
  2. const cheerio = require('cheerio');
  3. const rp = require('request-promise');
  4. const solveRecaptcha = require('./solveRecaptcha');
  5.  
  6. (async () => {
  7. const cpf = '041.913.771-83';
  8. const dataNascimento = '06/04/1996';
  9.  
  10. const headers = {
  11. Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
  12. 'Accept-Language': 'pt-BR,pt;q=0.8,en-US;q=0.6,en;q=0.4',
  13. 'Cache-Control': 'max-age=0',
  14. 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36',
  15. };
  16.  
  17. const jar = rp.jar();
  18.  
  19. const firstAccess = await rp.post('https://www.receita.fazenda.gov.br/Aplicacoes/SSL/ATCTA/CPF/ConsultaSituacao/ConsultaPublica.asp', {
  20. headers,
  21. gzip: true,
  22. simple: false,
  23. strictSSL: false,
  24. jar,
  25. });
  26. console.log(firstAccess);
  27. })();
Add Comment
Please, Sign In to add comment