Mincka / DMArchiver

A tool to archive the direct messages, images and videos from your private conversations on Twitter
GNU General Public License v3.0
222 stars 25 forks source link

KeyError: Threads, Failed to execute script cmdline #29

Closed goofyhsk closed 6 years ago

goofyhsk commented 6 years ago

New Error attempting on Windows, With or without -di -dg

DMArchiver 0.1.6 Running on Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)]

Authentication succeedeed.

Conversation ID not specified. Retrieving all the threads. Traceback (most recent call last): File "dmarchiver\cmdline.py", line 95, in File "dmarchiver\cmdline.py", line 86, in main File "dmarchiver\core.py", line 302, in get_threads KeyError: 'threads' Failed to execute script cmdline

DMArchiver 0.1.7 Running on Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)]

Authentication succeedeed.

Press Ctrl+C at anytime to write the current conversation and skip to the next o ne. Keep it pressed to exit the script.

Conversation ID not specified. Retrieving all the threads. Traceback (most recent call last): File "dmarchiver\cmdline.py", line 107, in File "dmarchiver\cmdline.py", line 96, in main File "dmarchiver\core.py", line 302, in get_threads KeyError: 'threads' Failed to execute script cmdline

Mincka commented 6 years ago

Thanks for the error reporting.

Issue seems to be related to updated json structure with an additional "trusted" array.

I will look to update following lines to fix the issue. Hopefully, it will be enough.

https://github.com/Mincka/DMArchiver/blob/master/dmarchiver/core.py#L302 json['inner']['trusted']['threads'] https://github.com/Mincka/DMArchiver/blob/master/dmarchiver/core.py#L304 json['inner']['trusted']['has_more']