Tyrrrz / DiscordChatExporter

Exports Discord chat logs to a file
MIT License
7.65k stars 699 forks source link

Tenor/otherwise .gifs export as .png #1120

Closed Nowena closed 11 months ago

Nowena commented 1 year ago

Version

2.40.4

Flavor

GUI (Graphical User Interface), CLI (Command-Line Interface)

Platform

Windows 10

Export format

JSON

Steps to reproduce

Either method I use, GUI or CLI exports all gifs from tenor/otherwise as png files.

Details

Is this expected behaviour?

Checklist

Tyrrrz commented 1 year ago

I think this is expected for JSON because it references only the thumbnail and not the actual video (it's gifv by the way, not gif). HTML references both, so it should download both.

Nowena commented 1 year ago

Does the HTML format fetch the image files separately like JSON does and am I able to parse/search within HTML exports?

Tyrrrz commented 1 year ago

If you enable "download assets", it will download all assets referenced by the export file (i.e., the html file). Note that the purpose of "download assets" is to make the export file usable offline, not to scrape the channel off all multimedia content.

Nowena commented 1 year ago

Does DiscordChatExporter-frontend allow you to explore HTML files? If not, could that be made possible?

Tyrrrz commented 1 year ago

That's a different project, so you should ask there. But I imagine it only uses JSON for a reason.

Nowena commented 1 year ago

Oh, right. It is not by you. I noticed something about .gif exports. Tenor offers both SD/HD .gifs and .mp4 files. DiscordChatExporter fetches the mp4 files for some reason and exports them. Any way to make it fetch .gif files instead?

Tyrrrz commented 1 year ago

No, it's what Discord provides so that's what DCE references:

https://github.com/Tyrrrz/DiscordChatExporter/blob/6fb61086106784dbfc57c250bc1ad90c6e0f8bf1/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml#L464-L476

nitrocell commented 1 year ago

Is it possible to make the JSON export fetch the .mp4 urls too?

Tyrrrz commented 1 year ago

It might increase the export size significantly without benefit for most users. If you want to scrape media files from a server, using DCE might not be the best choice. What is your use case?

nitrocell commented 1 year ago

I mean, speaking about links, it would make more sense to scrape the .mp4 link instead of the .png for Tenor gifs in JSON export since it's more faithful to what is actually shown in the message itself.

nitrocell commented 1 year ago

If it shows the .mp4 for Giphy in JSON export, I think it should do the same for Tenor

nitrocell commented 1 year ago

What i wanted to ask more specifically, is that if it's possible to JSON export .mp4 links for both Tenor and Giphy