DMArchiver is broken #83
Description
I'm really just kind of hoping to open a dialogue here; I have no idea if there's anything we can reasonably do to solve this issue, but I mostly just want to hear that this is actually affecting somebody else. Earlier this week, this started happening to me:
$ dmarchiver
DMArchiver 0.2.6
Running on Python 3.7.6 (default, Jan 8 2020, 19:59:22)
[GCC 7.3.0]
[...]
Press Ctrl+C at anytime to write the current conversation and skip to the next one.
Keep it pressed to exit the script.
Conversation ID not specified. Retrieving all the threads.
Expecting value: line 1 column 1 (char 0)
The last line there is the JSON parser failing, because the POST request doesn't give a valid response. This happens whether or not you specify a conversation ID; it seems that all messages URLs that were in use now fail. Authentication still works, but ~nothing else related to DMs, as far as I can tell. I tried several different changes to the headers passed into the request, but nothing that produced actual fruitful results.
I went through some of #79 seeking an alternate solution, but the API endpoints mentioned in there seem to not exist anymore, or are locked behind some kind of additional authentication, despite my API application having permissions for DM access.
$ twurl -X GET /1.1/dm/conversation/[conversation_id].json
{"errors":[{"message":"Your credentials do not allow access to this resource","code":220}]}
This is not specific to twurl, either... as I noted over in bear/python-twitter#665 (a PR which updates a deprecated DM endpoint in python-twitter
), I get useless output there, an empty events
array (when according to Twitter's own documentation, "[i]n rare cases the events array may be empty"). e.g.:
In [4]: api.GetDirectMessages(return_json=True)
Out[4]: {'events': [], 'next_cursor': 'MTI5NDc2OTE5NTc1MDc3Mjc0Nw'}
This matches my experience using twurl as suggested in that documentation, too.
I'm hypothesizing that this all has something to do with the breach Twitter experienced last month and their development for the v2.0 API, but the gut punch is that API access to DMs is listed under "Nesting" (the least-developed column, it seems) on the roadmap, which means that we may be months from a solution if the methods used in this application are no longer viable. I'd love to contribute to a solution here that doesn't involve an always-running selenium webdriver or some other related nonsense, but I'm not sure how to approach it.