Jan 19, 2021
Try printing out what each 'tweet' is. So write something like:
for tweet in response.json()['data']:
print(tweet)
The problem here is that there is no 'id_str' entry in your tweet object, which could be because the API request was not fulfilled properly, or the format is different? I don't seem to be able to replicate this on my side though, I've added another code snippet here:
https://gist.github.com/jamescalam/366dd83516b73dea3cfd10f8716bcfbb
Check that everything seems to line up, good luck, let me know what you get :)