3bl3gamer / tg_history_dumper

Exports messages and media from Telegram dialogs, groups and channels
MIT License
64 stars 13 forks source link

HTTP preview is not working #35

Closed tangor86 closed 2 weeks ago

tangor86 commented 2 weeks ago

hello,

I run http preview like this: tg_history_dumper -config "C:\Users\XXXXXXXX\go\bin\tg_history_dumper.json" -preview-http 127.0.0.1:9000

Then i go to the host and I see as below which is correct: image

But when i click to the specific chat (any) and got navigated: http://127.0.0.1:9000/chats/2241725579

I have error like this: image

Is it a bug or i am doing something wrong?

P.S: I do have all necessary files created after the export in the "history" folder: image

tangor86 commented 2 weeks ago

This is my config file if needed:

{
    "app_id": 11111111111111,
    "app_hash": "xxxxxxxxxxxxxxx",
    "request_interval_ms": 1000,
    "session_file_path": "tg.session",
    "out_dir_path": "history",
    "history": [
        {"id": xxxx}
    ],
    "stories": "none",
    "media": [
        {"type": "channel"}
    ],
    "history_limit": {
       "20000": {"type": "channel"}
    },
    "dump_account": "off",
    "dump_contacts": "off",
    "dump_sessions": "off"
}

PS: i only export channels for now

3bl3gamer commented 2 weeks ago

Preview currently requires a history/account file with current user's info (controlled by "dump_account"). In general, it should not be required, but as a temporary workaround you can run the dumper once with -dump_account=write to create this account file.

tangor86 commented 2 weeks ago

huge thanks it works with "dump_account": "write" !