Closed nadesai closed 2 years ago
One thing to note is a potential clash between caching of data in "users" mode as in "likes" mode. However, the current caching approach also runs this risk. For example, if one does a "users" mode search for @eleurent
, but then does a "tweets" mode search for the query eleurent
, both runs would use the same "followers" cache file (<out path>/eleurent/<followers file>
). Based on this, I'm assuming that such a clash is okay as long as runs are done sequentially and their final output data is organized in a way that doesn't cause confusion.
Hi @nadesai, this is a great suggestion, thank you for looking into this! I agree that the current caching system is not ideal, and subject to clashes, but I agree that your proposal should be enough to circumvent it. Even if we wanted to implement a betters solution, it should be its own feature and implemented separately of this 'likes' feature.
I use my "liked" list as a way to bookmark both tweets and accounts, the latter especially because I usually am at the Twitter follow limit. It would be interesting for this analysis to be extended to the "liked" tweets of a given user, analogous to what is currently done for a search query.
The way to implement this seems simple enough. The relevant API is at https://developer.twitter.com/en/docs/twitter-api/tweets/likes/introduction and I think api.GetFavorites is the corresponding
python-twitter
entry point.The same caching approach as is used for
tweets
mode should work -<out path>/<target>/<tweets_file>
can store the liked tweets, and<out path>/<target>/<followers_file>
can store the authors of the liked tweets. Unlike with tweets mode, in this case<target>
is a username rather than a search query.I'm working on implementing this right now but don't have enough code to create a PR yet; figured I would file a feature request for discussion in case this has already been worked on or if there is an obvious problem with this I am missing.