python-twitter icon indicating copy to clipboard operation
python-twitter copied to clipboard

GetSearch include_entities documentation is confusing

Open jlevers opened this issue 5 years ago • 0 comments

The documentation for the include_entities kwarg on GetSearch (here) says that each Status object will have an entities node with metadata like hashtags, urls, etc. That led me to believe that I could access (for example) the hashtags data on a Status object s like so:

s.entities.hashtags

In practice, there was no entities property on Status objects, regardless of whether or not I passed include_entities=True. After stepping through the code, I realized that passing the include_entities kwarg added the hashtags, urls, etc, as direct attributes on the Status object. In other words, those pieces of metadata are accessible via s.hashtags, s.urls, etc, rather than via s.entities.hashtags, s.entities.urls, and so on.

If I'm misunderstanding something and this is totally off base, please let me know. Thanks!

jlevers avatar Feb 26 '20 01:02 jlevers