omkarcloud / botasaurus-proxy-authentication

Proxy Server with support for SSL, proxy authentication and upstream proxy.
https://www.omkar.cloud/
MIT License
9 stars 2 forks source link

Auth proxy error #4

Closed qqlaker closed 5 months ago

qqlaker commented 5 months ago

I'm using botasaurus this way:

@browser(
    proxy="http://login:pass@ip:port",
    headless=False,
    create_driver=create_stealth_driver(
        raise_exception=True,
        start_url='...',
        wait=5,
    ),
)
def scrape_heading_task(driver: AntiDetectDriver, data):
    pass

and got an TypeError

Traceback (most recent call last):
  File "/home/qqlaker/VSCProjects/test/botasaurus_test.py", line 89, in <module>
    scrape_heading_task()
  File "/home/qqlaker/.local/share/virtualenvs/test-dSLe-Nih/lib/python3.10/site-packages/botasaurus/decorators.py", line 656, in wrapper_browser
    current_result = run_task(data_item, False, 0)
  File "/home/qqlaker/.local/share/virtualenvs/test-dSLe-Nih/lib/python3.10/site-packages/botasaurus/decorators.py", line 471, in run_task
    ) = create_options_and_driver_attributes_and_close_proxy(
  File "/home/qqlaker/.local/share/virtualenvs/test-dSLe-Nih/lib/python3.10/site-packages/botasaurus/create_driver_utils.py", line 302, in create_options_and_driver_attributes_and_close_proxy
    options = add_proxy_options(options, proxy)
  File "/home/qqlaker/.local/share/virtualenvs/test-dSLe-Nih/lib/python3.10/site-packages/botasaurus_proxy_authentication/__init__.py", line 30, in add_proxy_options
    new_proxy = create_proxy(proxy)
  File "/home/qqlaker/.local/share/virtualenvs/test-dSLe-Nih/lib/python3.10/site-packages/botasaurus_proxy_authentication/__init__.py", line 21, in create_proxy
    return getchain().anonymizeProxy(proxy_url,  timeout=300, authInfo={})
TypeError: Proxy.__call__() got an unexpected keyword argument 'authInfo'