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

can't login in in AWS #34

Closed
zhajingwen opened this issue Feb 25, 2024 · 3 comments
Closed

can't login in in AWS #34

zhajingwen opened this issue Feb 25, 2024 · 3 comments

Comments

@zhajingwen
Copy link

root@spiders-54696c5948-qfkt8:/spider# python test.py
Traceback (most recent call last):
File "/spider/test.py", line 11, in
client.login(
File "/usr/local/lib/python3.9/site-packages/twikit/client.py", line 134, in login
guest_token = self._get_guest_token()
File "/usr/local/lib/python3.9/site-packages/twikit/client.py", line 58, in _get_guest_token
response = self.http.post(
File "/usr/local/lib/python3.9/site-packages/twikit/http.py", line 54, in post
return self.request('POST', url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/twikit/http.py", line 42, in request
raise TooManyRequests(message)
twikit.errors.TooManyRequests: status: 429, message: "{"code":88,"message":"Rate limit exceeded."}"
root@spiders-54696c5948-qfkt8:/spider#

@d60
Copy link
Owner

d60 commented Feb 26, 2024

Please try using a proxy.
Example:

proxies = {
    'http://': 'http://160.11.12.13:1020',
    'https://': 'http://160.11.12.13:1020'
}
twikit.Client(
    'en-US',
    proxies=proxies
)

@zhajingwen
Copy link
Author

Please try using a proxy. Example:

proxies = {
    'http://': 'http://160.11.12.13:1020',
    'https://': 'http://160.11.12.13:1020'
}
twikit.Client(
    'en-US',
    proxies=proxies
)

ok, thanks let me have a try

@zhajingwen
Copy link
Author

Please try using a proxy. Example:

proxies = {
    'http://': 'http://160.11.12.13:1020',
    'https://': 'http://160.11.12.13:1020'
}
twikit.Client(
    'en-US',
    proxies=proxies
)

ok, thanks let me have a try

Great, it worked, thank you

@d60 d60 closed this as completed Feb 26, 2024
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

2 participants