Open YanyangChen opened 5 years ago
importing package in pycharm
https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html
import requests from bs4 import BeautifulSoup
proxies = { 'http': 'http://proxy1...edb.gov.hk:8080/', }
page = requests.get("http://dataquestio.github.io/web-scraping-pages/simple.html", proxies=proxies) print(page.content)
setting http proxy
Open PyCharm, go to File then Settings. Click at HTTP Proxy under the IDE Settings. Click and enable the Use HTTP proxy check box. Fill in the IP address or Hostname of the proxy server you want to connect to and enter the port number which is being used by the proxy server.