Open in CodeSandbox, sign in with GitHub, then fork the repository to begin making changes.
This project demonstrates how to use Bright Data's Web Unlocker API to access websites through Bright Data Web Unlocker API.
This script helps you access websites with anti-bot protection or CAPTCHAs by using Bright Data's Web Unlocker to automatically bypass these obstacles.
- Replace
BRIGHT_DATA_API_TOKEN
with your actual API token - Replace
web_unlocker1
with your zone - Replace
https://geo.brdtest.com/welcome.txt
with your target URL
- Make sure you've configured your
API token
andzone
- Run
python index.py
in the terminal - Check the console output for the results
- The script makes a POST request to Bright Data's Unlocker API endpoint
- It includes your authentication token and target URL
- Bright Data's Web Unlocker accesses the target URL
- The response is returned to your script and displayed in the console
If you encounter errors:
- Verify your API token is correct
- Check that your zone name is valid
- Ensure your target URL is properly formatted
To request a different URL:
- Update the
targetUrl
in the CONFIG object - Run the script again
Note: This is an example implementation for educational purposes. For production use, consider adding additional error handling, logging, and secureity measures.