suurjaak / Skyperious

Skype chat history tool
Other
350 stars 36 forks source link

Export only available as text file? #101

Closed arun-gurung closed 3 years ago

arun-gurung commented 3 years ago

Skyperious can find my main chat and I can export also, but when I save it, the file chooser says it's a HTML-file, but the export is just a plain text file?

suurjaak commented 3 years ago

Can you describe in more detail, what steps you took and what was the result?

arun-gurung commented 3 years ago

As you know, I had to reinstall my system. Now everything looks correct and follow the usual steps like before, I select my chat and choose "export selected chat into individual files". In the "Save" dialogue, it says it saves as HTML but the end result is just a plain text file, although the chat is nicely formatted there.

suurjaak commented 3 years ago

What happens if you try the other export formats?

arun-gurung commented 3 years ago

Well, in the save dialogue box, there is no automatic file extension name. If I write manually that the file will end with .html then it exports correctly. The other formats also work.

suurjaak commented 3 years ago

Oho, looks like the file dialog behaves a bit differently under Linux. Will be fixed in an upcoming release.

Another workaround for now - open the chat in Skyperious and use the "Export messages to file" button, this seems to set the format correctly.

arun-gurung commented 3 years ago

OK thanks for another workaround.

Before you close the issue, I just wanna know why you can export pictures but no videos, voice messages, PDFs or other documents?

suurjaak commented 3 years ago

Shared videos and voice messages are exported, if available from Skype online. Other shared file contents in general are not - because a shared file can be hundreds of megabytes.

Although maybe I could provide that as a separate option..

But Skype retains shared files online only for 30 days (https://support.skype.com/en/faq/FA34644/skype-file-sharing-file-types-size-and-time-limits).

(I will keep this issue open until releasing a fix for the format selection)

arun-gurung commented 3 years ago

I have a video and voice messages which are newer than 30 days. I exported into HTML with shared media in a separate folder and there were only pictures there.

suurjaak commented 3 years ago

Can you do this:

What does it print?

If the result is something like <URIObject uri="https://api.asm.skype.com/v1/objects/0-weu-d8-....., what is the result if you copy the uri-value and execute db.live.get_api_media(that_copied_value, "video") (or "audio" if voice message)? If the result is empty, was there an error printed to the log window?

arun-gurung commented 3 years ago

It prints this, I don't get any URI.

page.stc_history.GetMessage(-1)["body_xml"] u'<files><file index="0" size="18023933">video937d29a9-8f4f-486a-af95-491aaa280a8bvideo.mp4'

I tried with a picture URI and I got lots of encoded output.

suurjaak commented 3 years ago

Sorry, did not understand - what picture URI did you try with?

But it looks like this message was not a video message, but a shared file instead.

If you're willing to try further:

What does the printed message look like?

(Btw, to avoid formatting issues with copy-pasted data as you seemed to have with your last comment, you can attach it as a file instead)

arun-gurung commented 3 years ago

I executed db.live.get_api_media(my_URI, "picture") and got a lot of encoded output that made no sense.

When I execute "chat = db.live.skype.chats[live.identity_to_id(page.chat["identity"])]" I get:

Traceback (most recent call last): File "<input>", line 1, in <module> AttributeError: 'NoneType' object has no attribute 'chats'

Then I execute "for msg in chat.getMsgs(): print repr(msg)" I get:

File "<input>", line 2 for msg in chat.getMsgs(): print repr(msg) ^ SyntaxError: invalid syntax

suurjaak commented 3 years ago

And the my_URI was what exactly?

Oops, forgot to specify the first step:

arun-gurung commented 3 years ago

my_URI was just a copy and paste from the Skyperious chat window, there was a link to a picture there.

I logged in and now I don't get a traceback error, but just empty output and get back to the prompt.

By the way, it looks like the video has been sent as a file. I recorded a video on my mobile and chose "share with Skype" and just sent it via there.

suurjaak commented 3 years ago

Yes, "share with Skype" means it's an ordinary file sharing. Sending an audio/video message is a different action inside Skype, where you record a clip to send.

Do you have any such messages that are not getting exported?

arun-gurung commented 3 years ago

The last video I sent was live recorded from inside Skype, but it looks like it was sent as a file. I did not select an already stored video from the disk.

No, I have only luck with exporting pictures and nothing else. Now I sent an already stored video from disk and it's the same, no URI only "Sent file video.mp4".

arun-gurung commented 3 years ago

I sent a voice message via Android and there is no URI, the Skyperious chat log says "Sent file 1-audioMessage.m4a". So, I guess it downloads only files that are uploaded to the Skype cloud.

I see you have no comment, so it can be a feature request. For example, optional choice to download attachments and a warning if the files are very big.

suurjaak commented 3 years ago

The newly released Skyperious v4.8 fixes the export type issue on Linux.

Can you confirm that the export issue is cleared?


It also downloads shared files in HTML export, if you choose the "HTML document with shared files in subfolder" type.

For that you need to re-synchronize the database from online, Can you confirm that it works for you? At least for recently shared files; there is some limit on how long the files are kept in Skype online.

arun-gurung commented 3 years ago

Yes, now the export file extension issue is resolved.

I exported my chat with only a single picture and everything went well. Then now I sent a video and a voice message for test and now I get an error during export, here's a screenshot. Screenshot_2021-08-01_21-28-50

suurjaak commented 3 years ago

Please reinstall the latest Skyperious and try again. A bug had crept in, I've updated the sources.

arun-gurung commented 3 years ago

I updated and now there is no export error, but alas it exported only an image and nothing else.

suurjaak commented 3 years ago

What if you send an ordinary file, does that get included in the "HTML document with shared files in subfolder" export?

arun-gurung commented 3 years ago

It successfully exported a PDF file, but still not the video and voice message.

suurjaak commented 3 years ago

Excellent that the file retrieval in general works.

Closing this issue, as the original problem was solved.

Can you open a new issue if video/audio messages are not being downloaded? And describe there more precisely what the export result was.