workhorsy / d-web-browser-history

Get web browser history with the D programming language
Boost Software License 1.0
2 stars 0 forks source link

Can't retrieve any url on windows #3

Open MassMessage opened 6 years ago

MassMessage commented 6 years ago

I'm not quite sure if it's the proper place to post it, I'm not much of active user on GitHub... if it's not you can just delete it.

My issue is: I've installed it with dub package but I can't retrieve anything. It only prints the paths where the history file is located, for example:

path: C:\Users\user1\AppData\Roaming/brave/History
path: C:\Users\user1\AppData\Default\History
path: C:\Users\user1\AppData\Roaming/Mozilla/Firefox/Profiles\xg0d1b6k.default\places.sqlite

NOTE: I noticied the that path concatenation uses \ and /, Windows accepts it, as far I know, but so does the Sqlite3 database engine you're using? as far I remembe, from the very first time I've used Sqlite3 I read somewhere all the slashs must be UNIX's /, even if you were on Windows environment.

the code I'm using is:

    import web_browser_history;
    import std.stdio : stdout;
    import derelict.sqlite3.sqlite : DerelictSQLite3;

    DerelictSQLite3.load();
    foreach (browser; web_browser_history.getInstalledBrowsers()) {
        web_browser_history.readHistory(browser, delegate(string url, int visit_count) {
            stdout.writefln("browser:%s, url:%s, count:%s", browser, url, visit_count);
        });
    }
workhorsy commented 6 years ago

I'll look into it. Thanks

workhorsy commented 6 years ago

I tried reproducing and it works fine for me. Can you give me some more info: OS version DMD version sqlite3 library version