myoutdeskllc / node-browser-history Goto Github PK
View Code? Open in Web Editor NEWThis module is aimed to get all browser history from some common web browsers.
License: ISC License
This module is aimed to get all browser history from some common web browsers.
License: ISC License
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
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.
Can you tell an approach to delete the browsing history/cache?
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
[]
[]
[]
[]
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 : []
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)
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.
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
Microsoft Edge has changed it's database table name from moz_places to urls. The code is not working for Microsoft.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.