Git Product home page Git Product logo

node-browser-history's People

Contributors

gabber7 avatar kevslashnull avatar mohit-mamtora avatar rmchale avatar tance77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

node-browser-history's Issues

SQLite error on some profile folders

Hello,

I've encountered an issue when using Edge on my computer where URLs cannot be retrieved. From my research, it seems that there are two profile folders on my computer named "yqpdjyl6.default" and "qxw2p5tx.default-release."

The folder ending with "release" belongs to my current profile, while the other one is presumably a default folder containing a completely empty "places.sqlite" file with no tables.

As a result, the SQL command at line 114 in the "index.js" file directly queries the "moz_places" table, causing a "No such table: moz places" error in the "getHistoryFromDb" function. Consequently, it is unable to read any URLs.

The "getHistoryFromDb" function can be modified accordingly to handle this situation. If the file is empty, it can proceed to the next file without disrupting the loop, resolving the issue.

image

image

image

using node-browser-history in eletron

placing getAllHistroy() method inside setInterval does not give latest history. It loads the browser data once and keeps showing the same data. Any ideas ? Thanks in advance

Returns null array when called again

const browserHistory = require('node-browser-history')
var ff = function(){
return new Promise(res => {
browserHistory.getAllHistory(60).then(history => {
console.log('PASS GET ALL HISTORY')
console.log(history);
console.log('\n------------------------------------------\n');
}, error => {
console.log('***** FAILED TO GET ALL HISTORY *****')
throw(error)
})
})
}

ff();
setTimeout(()=>{
ff();
},10000);

Above code return prefect JSON when called by first call ff() but for the second time inside setTimeout returns : []

All I get are empty arrays. What am I doing wrong?

App

const BrowserHistory = require('node-browser-history');


//Only All Support Browser History

/**
 * Gets the history for the Specified browsers and time in minutes.
 * Returns an array of browser records.
 * @param historyTimeLength | Integer
 * @returns {Promise<array>}
 */
BrowserHistory.getAllHistory(1440).then(function (history) {
  console.log(history);
});



/**
 * Gets Firefox history
 * @param historyTimeLength
 * @returns {Promise<array>}
 */
 BrowserHistory.getFirefoxHistory(1440).then(function (history) {
  console.log(history);
});

/**
 * Gets Chrome History
 * @param historyTimeLength time is in minutes
 * @returns {Promise<array>}
 */
 BrowserHistory.getChromeHistory(1440).then(function (history) {
  console.log(history);
});

BrowserHistory.getSafariHistory(1440).then(function (history) {
  console.log(history)
})

Output

[]
[]
[]
[]

import BrowserHistory from "node-browser-history" leads to an error in react

Hi.

I'm building a react app.
I'm using the following command:
import BrowserHistory from "node-browser-history"

the build is successful, but I'm catching an error in the browser console:
Uncaught TypeError: Cannot read property '_handle' of undefined

Research showed, that the problem appears in the component, where I import your lib.

Thanks in advance,

Ivan

Getting wrong History Database file when there are multiple user profiles in Chrome/Chromium.

When a user has multiple user profiles in Chrome, there are separate folders for the profiles other than the "Default" Folder. Both the "Default" folder and the user profile folder (e.g. "Profile 1") has separate history file. So the regex gets the first History file inside the "Default" folder which is wrong in case of the user using the "Profile 1".

So, in that case the returned history array is always empty.

Error on linux platform

I know this dependency isn’t supported on linux. However, it throws an ambiguous exception when being imported in an environment with process.platform === 'linux'.

Uncaught Exception:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:124:11)
    at Object.join (path.js:1039:7)
    at Object.<anonymous> (/home/kev/development/Kev/gitdock/node_modules/node-browser-history/browsers.js:46:25)
    at Module._compile (internal/modules/cjs/loader.js:1078:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
    at Module.load (internal/modules/cjs/loader.js:935:32)
    at Module._load (internal/modules/cjs/loader.js:776:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)

Maybe it can either fail with a more specific error (if platform === 'linux') or not provide any results on the functions.

Vivaldi history not obtained?

I tried using this package with the Vivaldi browser call (getVivaldiHistory(1000)) but it didn't return any history results (even though my Vivaldi has plenty of history), just an empty array, no errors. I also tried getAllHistory(1000) and it returned some Chrome and Firefox results, but no Vivaldi. Is there some setting I have to change in Vivaldi to have this exposed? (running win10, node v10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.