Skip to content

Commit

Permalink
explicitly set include_entities
Browse files Browse the repository at this point in the history
  • Loading branch information
edsu committed May 25, 2020
1 parent aac6f12 commit 8732802
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions twarc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def search(self, q, max_id=None, since_id=None, lang=None,
params = {
"count": 100,
"q": q,
"include_ext_alt_text": 'true'
"include_ext_alt_text": 'true',
"include_entities": "true"
}

if lang is not None:
Expand Down Expand Up @@ -489,6 +490,7 @@ def hydrate(self, iterator, trim_user=False):
resp = self.post(url, data={
"id": ','.join(ids),
"include_ext_alt_text": 'true',
"include_entities": 'true',
"trim_user": trim_user
})
tweets = resp.json()
Expand All @@ -502,7 +504,9 @@ def hydrate(self, iterator, trim_user=False):
log.info("hydrating %s", ids)
resp = self.post(url, data={
"id": ','.join(ids),
"include_ext_alt_text": 'true'
"include_ext_alt_text": 'true',
"include_entities": 'true',
"trim_user": trim_user
})
for tweet in resp.json():
yield tweet
Expand Down

0 comments on commit 8732802

Please sign in to comment.