Hello,
Yes, 1398361598062854144 worked for me as well but 1224970162459172865 is older than 7 days, I tried with other older tweet_ids (using search/all) and it did not work.
The account default account used by twurl is the one that should be associated with the Academic Research account. But I do not have access to the dashboard since this is my colleague’s account.
So I ran test_api.py as suggested in #469
but I got this error
{“title”:“Unauthorized”,“type”:“about:blank”,“status”:401,“detail”:“Unauthorized”}
I am guessing this might mean it is not attached to the Academic Research app but I am waiting on my colleague to confirm.
In the meantime I also tried running
twarc2 conversations TEST.txt TEST.jsonl
but got the error
Unable to parse 400 error as JSON: Bad Request
Then I tried running
import datetime
import itertools
import twarc
from twarc.client2 import Twarc2
from twarc.expansions import flatten
# Your bearer token here
t = Twarc2(bearer_token="TOKEN")
# Start and end times must be in UTC
start_time = datetime.datetime(2006, 3, 21, 0, 0, 0, 0, datetime.timezone.utc)
end_time = datetime.datetime(2021, 5, 27, 0, 0, 0, 0, datetime.timezone.utc)
# search_results is a generator, max_results is max tweets per page, 500 max for full archive search.
search_results = t.search_all(query="conversation_id:1224970162459172865", start_time=start_time, end_time=end_time, max_results=10)
# Get just 1 page of results instead of iterating over everything in search_results:
# To get everything use `for page in search_results:`
for page in itertools.islice(search_results, 1):
# Do something with the page of results:
# print(page)
# or alternatively, "flatten" results returning 1 tweet at a time, with expansions inline:
for tweet in flatten(page)['data']:
# Do something with the tweet
print(tweet)
But I got this error
NameError: name 'requires_app_auth' is not defined