Skip to content

pedropiloto/investing.com-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Investing.com Scraper

Install

npm install investing.com-scraper

Usage

symbol is the human readable identifier that investing uses to identify an index.

options is an object with the following keys

  • debug [Boolean] launches chromium locally, omits headless mode (default: false)
  • browserInstance [PuppeteerBrowser]: bring your own browser instance for more control
const InvestingScraper = require("investing-scraper");

// which index to scrape?
const symbol = "us-spx-500";

// options
const options = {
  debug: false,
  browserInstance: undefined,
}

// get index quote
const indexQuote = await InvestingScraper.indexQuote(symbol);

Bring your own puppeteer

if you want to customize the settings for your puppeteer instance you can add your own puppeteer browser instance in the options.

const puppeteer = require('puppeteer-extra');
// add stealth plugin and use defaults (all evasion techniques)
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
puppeteer.use(StealthPlugin());

const myPuppeteerInstance = await puppeteer.launch(myCustomSettings);

const result = await InvestingScraper.indexQuote("%5EGSPC", {
  browserInstance: myPuppeteerInstance
});

Demo

npm run demo

Contribute

Open PR or issue if you would like to have more features added.

About

investing.com scrapper with puppeteer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published