官术网_书友最值得收藏!

Getting ready...

In this recipe, we will scrape the upcoming Python events from https://www.python.org/events/pythonevents. The following is an an example of The Python.org Events Page (it changes frequently, so your experience will differ):

We will need to ensure that Requests and Beautiful Soup are installed.  We can do that with the following:

pywscb $ pip install requests
Downloading/unpacking requests
Downloading requests-2.18.4-py2.py3-none-any.whl (88kB): 88kB downloaded
Downloading/unpacking certifi>=2017.4.17 (from requests)
Downloading certifi-2018.1.18-py2.py3-none-any.whl (151kB): 151kB downloaded
Downloading/unpacking idna>=2.5,<2.7 (from requests)
Downloading idna-2.6-py2.py3-none-any.whl (56kB): 56kB downloaded
Downloading/unpacking chardet>=3.0.2,<3.1.0 (from requests)
Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB): 133kB downloaded
Downloading/unpacking urllib3>=1.21.1,<1.23 (from requests)
Downloading urllib3-1.22-py2.py3-none-any.whl (132kB): 132kB downloaded
Installing collected packages: requests, certifi, idna, chardet, urllib3
Successfully installed requests certifi idna chardet urllib3
Cleaning up...
pywscb $ pip install bs4
Downloading/unpacking bs4
Downloading bs4-0.0.1.tar.gz
Running setup.py (path:/Users/michaelheydt/pywscb/env/build/bs4/setup.py) egg_info for package bs4
主站蜘蛛池模板: 息烽县| 进贤县| 都兰县| 临泉县| 南木林县| 宜州市| 黑水县| 广丰县| 介休市| 星座| 延川县| 普陀区| 博野县| 揭东县| 保德县| 宜州市| 洱源县| 内丘县| 汉寿县| 色达县| 海安县| 璧山县| 赫章县| 江川县| 邳州市| 湘潭市| 隆化县| 平度市| 德庆县| 思南县| 南华县| 天柱县| 庆云县| 玛沁县| 边坝县| 沙雅县| 牙克石市| 汤原县| 交口县| 延庆县| 牟定县|