
⚙️ Prerequisites
- A working proxy
- Python installed
- Capsolver API key
🤖 Step 1: Install Necessary Packages
Execute the following commands to install the required packages:
pip install capsolver
👨💻 Python Code for bypass Datadome with Proxy
Here's a Python sample script to accomplish the task:
import capsolver
capsolver.api_key = "your pay per usage key"
PAGE_URL = "websiteURL"
CAPTCHA_URL = "geo captcha url"
PROXY = "http://username:password@host:port"
def solver_datadome(url,captchaURL, proxy):
solution = capsolver.solve({
"type": "DatadomeSliderTask",
"websiteURL": url,
"captchaUrl": captchaURL,
"proxy": proxy,
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
})
return solution
def main():
print("Solving Datadome...")
solution = solver_datadome(PAGE_URL,CAPTCHA_URL,PROXY )
print("Solution: ", solution)
if __name__ == "__main__":
main()
⚠️ Change these variables
- PROXY: Update with your proxy details. The format should be http://username:password@ip:port.
- capsolver.api_key: Obtain your API key from the Capsolver Dashboard.
- PAGE_URL: Replace with the URL of the website for which you wish to bypass datadome captcha
- CAPTCHA_URL: Change to the website's captcha URL that begins with geo.captcha-delivery. The website URL varies each time; gather the query parameters' value to create the captcha URL.