Noticeably Playful Monkeys

    browser-headers-generator

    0.0.1 • Public • Published

    Browser headers generator

    This package emulates browser-like headers for Firefox and Chrome browsers. It picks a random user-agent and then adds correct headers to look precisely like a browser.

    This package is useful everywhere where a simulation of browser headers is necessary, such as web scraping, testing, web automation.

    Example usage

    By default, both chrome and firefox browsers are used as well as linux, mac, windows operating systems.

    const BrowserHeadersGenerator = require("browser-headers-generator");
     
    const browserHeadersGenerator = new BrowserHeadersGenerator();
    await browserHeadersGenerator.initialize()
     
    const randomBrowserHeaders = await browserHeadersGenerator.getRandomizedHeaders()

    Get random headers only for Chrome on windows:

    const BrowserHeadersGenerator = require("browser-headers-generator");
     
    const browserHeadersGenerator = new BrowserHeadersGenerator({
            operatingSystems: ["windows"],
            browsers: ["chrome"]
    });
     
    await browserHeadersGenerator.initialize()
     
    const randomBrowserHeaders = await browserHeadersGenerator.getRandomizedHeaders()

    Keywords

    none

    Install

    npm i browser-headers-generator

    DownloadsWeekly Downloads

    5

    Version

    0.0.1

    License

    Apache-2.0

    Unpacked Size

    10.6 kB

    Total Files

    6

    Last publish

    Collaborators

    • petrpatek