estou tendo esse esse ao testar, ja passei mais de 6 horas tentando resolver e nada até agora, por favor mim ajudem
rogerio@DESKTOP-831UN2G:~$ cd twitter_pipelene_alura/
rogerio@DESKTOP-831UN2G:~/twitter_pipelene_alura$ source venv/bin/activate
(venv) rogerio@DESKTOP-831UN2G:~/twitter_pipelene_alura$ export AIRFLOW_HOME=$(pwd)/airflow_pipeline
(venv) rogerio@DESKTOP-831UN2G:~/twitter_pipelene_alura$ python3.9 airflow_pipeline/hook/twitter_hooks.py
[2022-12-10 20:07:00,223] {base.py:68} INFO - Using connection ID 'twitter_default' for task execution.
[2022-12-10 20:07:00,229] {twitter_hooks.py:34} INFO - URL: https://api.twitter.com/2/tweets/search/recent?query=datascience&tweet.fields=author_id,conversation_id,created_at,id,in_reply_to_user_id,public_metrics,lang,text&expansions=author_id&user.fields=id,name,username,created_at&start_time=2022-12-09T00:00:00.00Z&end_time=2022-12-10T20:06:59.00Z
[2022-12-10 20:07:00,516] {http.py:142} ERROR - HTTP error: Unauthorized
[2022-12-10 20:07:00,536] {http.py:143} ERROR - {
"title": "Unauthorized",
"type": "about:blank",
"status": 401,
"detail": "Unauthorized"
}
Traceback (most recent call last):
File "/home/rogerio/twitter_pipelene_alura/venv/lib/python3.9/site-packages/airflow/providers/http/hooks/http.py", line 140, in check_response
response.raise_for_status()
File "/home/rogerio/twitter_pipelene_alura/venv/lib/python3.9/site-packages/requests/models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.twitter.com/2/tweets/search/recent?query=datascience&tweet.fields=author_id,conversation_id,created_at,id,in_reply_to_user_id,public_metrics,lang,text&expansions=author_id&user.fields=id,name,username,created_at&start_time=2022-12-09T00:00:00.00Z&end_time=2022-12-10T20:06:59.00Z
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/rogerio/twitter_pipelene_alura/airflow_pipeline/hook/twitter_hooks.py", line 81, in <module>
for pg in TwitterHook(end_time, start_time, query).run():
File "/home/rogerio/twitter_pipelene_alura/airflow_pipeline/hook/twitter_hooks.py", line 69, in run
return self.paginate(url_raw, session)
File "/home/rogerio/twitter_pipelene_alura/airflow_pipeline/hook/twitter_hooks.py", line 43, in paginate
response = self.connect_to_endpoint(url_raw, session)
File "/home/rogerio/twitter_pipelene_alura/airflow_pipeline/hook/twitter_hooks.py", line 36, in connect_to_endpoint
return self.run_and_check(session, prep, {})
File "/home/rogerio/twitter_pipelene_alura/venv/lib/python3.9/site-packages/airflow/providers/http/hooks/http.py", line 183, in run_and_check
self.check_response(response)
File "/home/rogerio/twitter_pipelene_alura/venv/lib/python3.9/site-packages/airflow/providers/http/hooks/http.py", line 144, in check_response
raise AirflowException(str(response.status_code) + ":" + response.reason)
airflow.exceptions.AirflowException: 401:Unauthorized
(venv) rogerio@DESKTOP-831UN2G:~/twitter_pipelene_alura$