You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using standard REST APIs in extended mode (passing tweet_mode=extended to any endpoint) the tweet contains no "text" field, only a "full_text" one.
Therefore tweet_checking.check_tweet() throws a NotATweetError.
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for the note, that's a good point.
I imagine fixing this bug would involve changing the tweet_text.py getters and checking others for compatibility with the "extended" mode. Are there any other areas where extended mode isn't functioning as expected with the tweet_parser package? Can you share any workarounds you've used?
I did not encounter other areas where extended mode isn't functioning.
Easy and ugly workaround: add to tweet_text.get_text() and .get_full_text() if ("text" not in tweet and "full_text" in tweet): return tweet["full_text"] elif ...
and remove "text" from tweet_checking._check_original_format_tweet(), so that it looks like for key in ["user"]: if key not in tweet: raise NotATweetError("This dict has no '{}' key".format(key))
When using standard REST APIs in extended mode (passing tweet_mode=extended to any endpoint) the tweet contains no "text" field, only a "full_text" one.
Therefore tweet_checking.check_tweet() throws a NotATweetError.
The text was updated successfully, but these errors were encountered: