-
Notifications
You must be signed in to change notification settings - Fork 192
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
Add proxies support #154
Comments
@obnoxiousish How did you get proxies to work for you? I couldn't get it to work for me. Please can you help with how I can subclass Scraper, Account and Search classes so I can use proxies with it? |
https://github.com/obnoxiousish/async_twitter_api_client proxy support was added in my async version ( i think it might be missing a couple endpoints, i dont remember, + readme is outdated at time of posting this, uses asyncAuthenticate now instead of ainit |
i'm new here, thanks for all your write it help me a lot. but i more explanation, could you share thank in any advance |
@trevorhobenshield 's official git repo supports saving cookies to file via .save_cookies() or something, look over account.py |
thank, got it. |
Hi Trevor thanks for creating this repository, very very helpful for my current project. Also from vancouver <3
But anyways, I was looking at the best way I could use proxies with the Account class, and while the Account class does indeed take a session kwarg it checks to see if the session is authenticated, if I want to authenticate with email user password I could import the Login function and do that and get an authenticated Client
BUT if I do that it will login without the proxy and Login does not accept a session kwarg it creates a Client from HTTPX and even though **kwargs gets passed along to __validate_session and then to login it gets used in execute_login_flow kwargs not the Client kwargs
So I think the best patch would be to include a proxies=kwargs.pop("proxies", None) in Client for the login function
For cookies auth, I recommend adding kwargs.pop('proxies', None) to proxies= for their Clients as well in __validate_session
I might be able to make a pull request but its like a couple lines so i imagine it could be added with ease
Thanks for reading
The text was updated successfully, but these errors were encountered: