You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from ..proxy_providerimportProxyProvider, ProxyConfig
4
+
from ..exceptionsimportProxyFetchException,ProxyInvalidResponseException
5
+
from ..models.proxyimportProxy
6
+
importthreading
7
+
8
+
classBrightData(ProxyProvider):
9
+
"""BrightData (formerly luminati) is a proxy provider that offers residential and datacenter proxies.
10
+
11
+
Create an account `here <https://get.brightdata.com/davidteather>`_ (affiliate link).
12
+
13
+
You can find your API key in the account settings `here <https://brightdata.com/cp/setting/users>`_ then create "add token" with scope "limit" (`BrightData article <https://docs.brightdata.com/general/account/api-token>`_ for more info)
14
+
15
+
The BrightData API documentation is `here <https://docs.brightdata.com/api-reference/account-management-api/Get_active_Zones?playground=open>`_
16
+
17
+
:param api_key: Your BrightData API key
18
+
:param zone: The zone ID/name to fetch proxies for (you can get this from the BrightData dashboard)
19
+
:param username_suffix: Optional suffix to append to the username `more info <https://docs.brightdata.com/proxy-networks/config-options>`_ allows you to target region, city, etc. (requires use_super_proxy=True)
20
+
:param use_super_proxy: Optional flag to use super proxy instead of targeting specific IPs, this is enabled by default. If you want to target specific IPs or have consistent IPs for a session, set this to False.
21
+
:param config: Configuration for the proxy provider. View the ProxyConfig class docs for more information.
22
+
23
+
Example:
24
+
25
+
.. code-block:: python
26
+
27
+
from proxyproviders import BrightData
28
+
29
+
# Initialize the BrightData API client with an API key and a zone
0 commit comments