diff --git a/package.json b/package.json index 658fd2a..ed56489 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cei-crawler", - "version": "2.0.3", + "version": "2.1.0", "description": "Crawler para pegar dados do Canal Eletronico do Investidor", "main": "src/app.js", "repository": { diff --git a/src/lib/CeiCrawler.js b/src/lib/CeiCrawler.js index e81c75e..a10a6c5 100644 --- a/src/lib/CeiCrawler.js +++ b/src/lib/CeiCrawler.js @@ -40,7 +40,7 @@ class CeiCrawler { this._cookieManager = new FetchCookieManager({ 'Host': 'cei.b3.com.br', 'Origin': 'https://cei.b3.com.br', - 'Referer': 'https://cei.b3.com.br/CEI_Responsivo/login.aspx', + 'Referer': 'https://ceiapp.b3.com.br/CEI_Responsivo/login.aspx', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36' }, this.options.navigationTimeout); } @@ -63,7 +63,7 @@ class CeiCrawler { if ((this.options && this.options.trace) || false) console.log('Logging at CEI...'); - const getPageLogin = await this._cookieManager.fetch("https://cei.b3.com.br/CEI_Responsivo/login.aspx"); + const getPageLogin = await this._cookieManager.fetch("https://ceiapp.b3.com.br/CEI_Responsivo/login.aspx"); const doomLoginPage = cheerio.load(await getPageLogin.text()); doomLoginPage('#ctl00_ContentPlaceHolder1_txtLogin').attr('value', this.username); @@ -87,7 +87,7 @@ class CeiCrawler { }); await CeiUtils.retry(async () => { - const postLogin = await this._cookieManager.fetch("https://cei.b3.com.br/CEI_Responsivo/login.aspx", { + const postLogin = await this._cookieManager.fetch("https://ceiapp.b3.com.br/CEI_Responsivo/login.aspx", { "headers": { "accept": "*/*", "accept-language": "pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7", @@ -100,7 +100,7 @@ class CeiCrawler { "x-requested-with": "XMLHttpRequest", 'Connection': 'keep-alive' }, - "referrer": "https://cei.b3.com.br/CEI_Responsivo/login.aspx", + "referrer": "https://ceiapp.b3.com.br/CEI_Responsivo/login.aspx", "referrerPolicy": "strict-origin-when-cross-origin", "body": formData, "method": "POST", diff --git a/src/lib/DividendsCrawler.js b/src/lib/DividendsCrawler.js index 279cea7..bb09015 100644 --- a/src/lib/DividendsCrawler.js +++ b/src/lib/DividendsCrawler.js @@ -6,7 +6,7 @@ const cheerio = require('cheerio'); const normalizeWhitespace = require('normalize-html-whitespace'); const PAGE = { - URL: 'https://cei.b3.com.br/CEI_Responsivo/ConsultarProventos.aspx', + URL: 'https://ceiapp.b3.com.br/CEI_Responsivo/ConsultarProventos.aspx', SUBMIT_BUTTON: '#ctl00_ContentPlaceHolder1_btnConsultar', TABLE_CLASS: '.responsive tbody', TABLE_CLASS_ROWS: '.responsive tbody tr', @@ -49,7 +49,7 @@ const FETCH_OPTIONS = { "x-microsoftajax": "Delta=true", "x-requested-with": "XMLHttpRequest" }, - "referrer": "https://cei.b3.com.br/CEI_Responsivo/ConsultarProventos.aspx", + "referrer": "https://ceiapp.b3.com.br/CEI_Responsivo/ConsultarProventos.aspx", "referrerPolicy": "strict-origin-when-cross-origin", "body": null, "method": "POST", @@ -68,7 +68,7 @@ const FETCH_OPTIONS = { "x-microsoftajax": "Delta=true", "x-requested-with": "XMLHttpRequest" }, - "referrer": "https://cei.b3.com.br/CEI_Responsivo/ConsultarProventos.aspx", + "referrer": "https://ceiapp.b3.com.br/CEI_Responsivo/ConsultarProventos.aspx", "referrerPolicy": "strict-origin-when-cross-origin", "body": null, "method": "POST", diff --git a/src/lib/StockHistoryCrawler.js b/src/lib/StockHistoryCrawler.js index 35493fb..fccb761 100644 --- a/src/lib/StockHistoryCrawler.js +++ b/src/lib/StockHistoryCrawler.js @@ -6,7 +6,7 @@ const cheerio = require('cheerio'); const normalizeWhitespace = require('normalize-html-whitespace'); const PAGE = { - URL: 'https://cei.b3.com.br/CEI_Responsivo/negociacao-de-ativos.aspx', + URL: 'https://ceiapp.b3.com.br/CEI_Responsivo/negociacao-de-ativos.aspx', SELECT_INSTITUTION: '#ctl00_ContentPlaceHolder1_ddlAgentes', SELECT_INSTITUTION_OPTIONS: '#ctl00_ContentPlaceHolder1_ddlAgentes option', SELECT_ACCOUNT: '#ctl00_ContentPlaceHolder1_ddlContas', @@ -60,7 +60,7 @@ const FETCH_OPTIONS = { "x-requested-with": "XMLHttpRequest", "Connection": "keep-alive" }, - "referrer": "https://cei.b3.com.br/CEI_Responsivo/negociacao-de-ativos.aspx", + "referrer": "https://ceiapp.b3.com.br/CEI_Responsivo/negociacao-de-ativos.aspx", "referrerPolicy": "strict-origin-when-cross-origin", "body": null, "method": "POST", @@ -79,7 +79,7 @@ const FETCH_OPTIONS = { "x-microsoftajax": "Delta=true", "x-requested-with": "XMLHttpRequest" }, - "referrer": "https://cei.b3.com.br/CEI_Responsivo/negociacao-de-ativos.aspx", + "referrer": "https://ceiapp.b3.com.br/CEI_Responsivo/negociacao-de-ativos.aspx", "referrerPolicy": "strict-origin-when-cross-origin", "body": null, "method": "POST", diff --git a/src/lib/WalletCrawler.js b/src/lib/WalletCrawler.js index 257415d..f21cf9c 100644 --- a/src/lib/WalletCrawler.js +++ b/src/lib/WalletCrawler.js @@ -6,7 +6,7 @@ const cheerio = require('cheerio'); const normalizeWhitespace = require('normalize-html-whitespace'); const PAGE = { - URL: 'https://cei.b3.com.br/CEI_Responsivo/ConsultarCarteiraAtivos.aspx', + URL: 'https://ceiapp.b3.com.br/CEI_Responsivo/ConsultarCarteiraAtivos.aspx', SELECT_INSTITUTION: '#ctl00_ContentPlaceHolder1_ddlAgentes', SELECT_INSTITUTION_OPTIONS: '#ctl00_ContentPlaceHolder1_ddlAgentes option', SELECT_ACCOUNT: '#ctl00_ContentPlaceHolder1_ddlContas', @@ -62,7 +62,7 @@ const FETCH_OPTIONS = { "x-microsoftajax": "Delta=true", "x-requested-with": "XMLHttpRequest" }, - "referrer": "https://cei.b3.com.br/CEI_Responsivo/ConsultarCarteiraAtivos.aspx", + "referrer": "https://ceiapp.b3.com.br/CEI_Responsivo/ConsultarCarteiraAtivos.aspx", "referrerPolicy": "strict-origin-when-cross-origin", "body": null, "method": "POST", @@ -81,7 +81,7 @@ const FETCH_OPTIONS = { "x-microsoftajax": "Delta=true", "x-requested-with": "XMLHttpRequest" }, - "referrer": "https://cei.b3.com.br/CEI_Responsivo/ConsultarCarteiraAtivos.aspx", + "referrer": "https://ceiapp.b3.com.br/CEI_Responsivo/ConsultarCarteiraAtivos.aspx", "referrerPolicy": "strict-origin-when-cross-origin", "body": null, "method": "POST",