项目作者: Smartproxy

项目描述 :
BeautifulSoup proxy authentication example for Smartproxy
高级语言: Python
项目地址: git://github.com/Smartproxy/BeautifulSoup.git
创建时间: 2019-07-09T12:32:04Z
项目社区:https://github.com/Smartproxy/BeautifulSoup

开源协议:MIT License

下载





:house: Main Repository :house:

Disclaimer

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.

Prerequisites

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.

Installation

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

curl smartproxy beautifulsoup http/https proxy configuration

You should now see your project folder populated with beautifulsoup.py file.

Configuration

To start using our example script, all you need to do is to configure the lines below.

Proxy username, password and endpoint:

  1. proxies = {'http': 'http://username:password@gate.smartproxy.com:7000', # Your username, password for proxy authentication, and desired endpoint within punctuation marks ('')
  2. 'https': 'http://username:password@gate.smartproxy.com:7000'}

smartproxy beautifulsoup http/https proxy configuration with username password authentication

Usage

To execute the example, simply run python command:

  1. python beautifulsoup.py

If everything was done correctly, you should be seeing the output as proxy IP:

Need help?

Email - sales@smartproxy.com

Live chat 24/7