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

Proxy issue #176

Open
sicholas opened this issue Apr 25, 2024 · 5 comments
Open

Proxy issue #176

sicholas opened this issue Apr 25, 2024 · 5 comments
Labels

Comments

@sicholas
Copy link

Have tried many proxy providers but haven't been able to get a single one to work with TWScrape. I receive no errors, just the scripts never do anything and sit there.

I have been adding proxies as so (have tried socks5, HTTP, and HTTPS):

async def add_proxy_to_account(api, account, proxy):
    username, password, email, email_password, cookie = account.split(':')
    proxy_url = proxy
    # print(proxy)
    await api.pool.add_account(username, password, email, email_password, cookies=cookie, proxy=proxy_url)
    print(f"Added proxy to account: {username}")

Thanks!

@takabinance
Copy link

fwiw, i've been able to use a proxy server without a problem. have you tried to do it globally. something like:

tw_scrape_db = os.path.join(os_path, "accounts.db")
token_pool = AccountsPool(db_file=tw_scrape_db)
tw_scrape_api = API(pool=token_pool, proxy=proxy_url)

@sicholas
Copy link
Author

fwiw, i've been able to use a proxy server without a problem. have you tried to do it globally. something like:

tw_scrape_db = os.path.join(os_path, "accounts.db") token_pool = AccountsPool(db_file=tw_scrape_db) tw_scrape_api = API(pool=token_pool, proxy=proxy_url)

Sorry for the delayed response. What provider do you use and what type of proxy are you using (HTTP, HTTPS, SOCKS5)? Thanks again!

@takabinance
Copy link

I've used royal and stormproxies. I settled on stormproxies residential as it's cheap, unlimited bandwidth and twitter doesn't seem to ban it so quickly. Http

@sicholas
Copy link
Author

@takabinance thank you so much and storm does rotating residential? So every request is randomized or are you just buying one singular static resi?

@takabinance
Copy link

I think it rotates every 5 mins.
They have a data center service that rotates on every request but felt like that was getting banned too often.

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

No branches or pull requests

3 participants