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

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
主站蜘蛛池模板: 达孜县| 南乐县| 包头市| 阜康市| 长岭县| 类乌齐县| 云梦县| 锡林郭勒盟| 隆尧县| 鸡泽县| 望谟县| 鸡泽县| 天台县| 建水县| 盘锦市| 独山县| 专栏| 新邵县| 太白县| 溧水县| 噶尔县| 红桥区| 榆社县| 苏尼特左旗| 新余市| 建瓯市| 鹤岗市| 西丰县| 景东| 盐源县| 临沧市| 岳池县| 桂林市| 永顺县| 衡东县| 黄石市| 新昌县| 阜城县| 新宾| 得荣县| 文山县|