YanyangChen / stock_analysis

0 stars 0 forks source link

Using pycharm #3

Open YanyangChen opened 5 years ago

YanyangChen commented 5 years ago

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.

YanyangChen commented 5 years ago

importing package in pycharm

https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html

YanyangChen commented 5 years ago

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)