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 · 1 comment
Open

Proxy issue #176

sicholas opened this issue Apr 25, 2024 · 1 comment

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)

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