The following example provides you with a basic request using a proxy to a specific website, if you want to learn more about Beautiful Soup, make sure to check their documentation here.
To run our example script, you are going to need a few Python libraries as well as Python 3.7.x itself with Beautiful Soup 4.
Once you have all the prerequisites ready, enter your project folder or create a new one.
When project directory is setup, you can download our script:
curl https://raw.githubusercontent.com/Smartproxy/BeautifulSoup/master/beautifulsoup.py > beautifulsoup.py
You should now see your project folder populated with beautifulsoup.py file.
To start using our example script, all you need to do is to configure the lines below.
Proxy username, password and endpoint:
proxies = {'http': 'http://username:[email protected]:7000', # Your username, password for proxy authentication, and desired endpoint within punctuation marks ('')
'https': 'http://username:[email protected]:7000'}
To execute the example, simply run python command:
python beautifulsoup.py
If everything was done correctly, you should be seeing the output as proxy IP:
Email - [email protected]
Live chat 24/7