Closed InfernoZeus closed 9 years ago
It's not possible to figure out which tweet another is in response to unless they've actually replied to the tweet. Anything else is going to be error prone and probably not that useful anyway. As it stands, the bot mirrors the linked tweet as well as the chain of tweets it's a reply to, like so, which covers most cases.
I wrote up a comment about using regex to detect the (1/2)
at the end, and then getting the users recent tweets and checking if the next one had (2/2)
, but I realised that the tweets being linked to won't always be the user's most recent tweets.
I haven't done anything with the Twitter API (or used Python in a while), but I'll have a poke around and see if I get anywhere.
I've done some very early prototyping here: https://github.com/InfernoZeus/TweetPoster/commit/9a97f3eb6680340fdc6b6640b94391b56099769b It works (http://www.reddit.com/r/InfernoZeus/comments/2soyk1/example_multipart_tweet/) but is very buggy - for example, I've no idea what will happen if subsequent parts are actually replies to the previous one. Probably post them in this order:
I also had to add in some extremely basic filtering so I could run tests in my own private subreddit.
Let me know if you have any thoughts :)
I couldn't find any information on whether this is already supported, but being able to detect multi-part tweets would be awesome. E.g. these two tweets:
https://twitter.com/CDECgaming/status/554940186832814080 https://twitter.com/CDECgaming/status/554940524163911680