Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RequestResponse(status_code=403, text='{"errors":[{"code":200,"message":"Forbidden."}]}') #106

Open
Kedao98 opened this issue Apr 21, 2023 · 11 comments

Comments

@Kedao98
Copy link

Kedao98 commented Apr 21, 2023

import arrow
import stweet as st


def try_search():
    search_tweets_task = st.SearchTweetsTask(all_words='#covid19', since=dt, until=dt2)
    output_jl_tweets = st.JsonLineFileRawOutput('output_raw_search_tweets.jl')
    output_jl_users = st.JsonLineFileRawOutput('output_raw_search_users.jl')
    output_print = st.PrintRawOutput()
    st.TweetSearchRunner(search_tweets_task=search_tweets_task,
                         tweet_raw_data_outputs=[output_print, output_jl_tweets],
                         user_raw_data_outputs=[output_print, output_jl_users]).run()


dt = arrow.Arrow(2023, 4, 20, 9, 30, 0)
dt2 = arrow.Arrow(2023, 4, 20, 9, 31, 0)
try_search() 

traceback

Traceback (most recent call last):
  File "/Users/kedao/Desktop/OPAY/ng-twitter-spider/new_twitter_spider.py", line 31, in <module>
    st.TweetSearchRunner(search_tweets_task=search_tweets_task,
  File "/Users/kedao/miniforge3/envs/anaconda_base/lib/python3.8/site-packages/stweet/search_runner/search_runner.py", line 51, in run
    self._execute_next_tweets_request()
  File "/Users/kedao/miniforge3/envs/anaconda_base/lib/python3.8/site-packages/stweet/search_runner/search_runner.py", line 71, in _execute_next_tweets_request
    raise ScrapBatchBadResponse(response)
stweet.exceptions.scrap_batch_bad_response.ScrapBatchBadResponse: RequestResponse(status_code=403, text='{"errors":[{"code":200,"message":"Forbidden."}]}')
@jcgq
Copy link

jcgq commented Apr 22, 2023

Same problem here

@xymou
Copy link

xymou commented Apr 23, 2023

Same problem. It seems that Twitter has changed the search page which now requires login first...

@Kedao98
Copy link
Author

Kedao98 commented Apr 23, 2023

Same problem. It seems that Twitter has changed the search page which now requires login first...

It might be caused by AIGC boom. A bound of companies want to train their model with twitter's data. Do you have a replacement of it?

@xymou
Copy link

xymou commented Apr 23, 2023

Same problem. It seems that Twitter has changed the search page which now requires login first...

It might be caused by AIGC boom. A bound of companies want to train their model with twitter's data. Do you have a replacement of it?

No, I haven't solved this problem yet either.😢 I guess we need to get some twitter accounts to simulate login or get cookies.

@BradKML
Copy link

BradKML commented Apr 27, 2023

Sad and unfortunate. Would need to keep an ugly eye on open-access.

@BoeingConstrictor
Copy link

Any update to this? I am having the same problem.

@1962983024
Copy link

(RequestResponse(status_code=403, text='{"errors":[{"code":200,"message":"Forbidden."}]}'),)
same problem

@dingteddy
Copy link

same problem

@justin-pierce
Copy link

is there no way to get a user's tweets without using the search? can't just scrape a profile and get the tweets?

@muskit
Copy link

muskit commented Jun 14, 2023

Is there a way to pass an auth token? I can't find it in the source so far...

@zernel
Copy link

zernel commented Jun 29, 2023

stweet.exceptions.scrap_batch_bad_response.ScrapBatchBadResponse: RequestResponse(status_code=403, text='{"errors":[{"code":200,"message":"Forbidden."}]}')

Same problem....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants