- Python Web Scraping Cookbook
- Michael Heydt
- 116字
- 2021-06-30 18:43:56
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
推薦閱讀
- 計算機網絡與通信(第2版)
- 互聯網基礎資源技術與應用發展態勢(2021—2023)
- 面向云平臺的物聯網多源異構信息融合方法
- 射頻通信系統
- Socket.IO Real-time Web Application Development
- The Kubernetes Workshop
- React Cookbook
- 5G+區塊鏈
- 智能物聯網:區塊鏈與霧計算融合應用詳解
- INSTANT Social Media Marketing with HootSuite
- Python Web Scraping Cookbook
- 物聯網傳感器技術與應用
- 結網@改變世界的互聯網產品經理(修訂版)
- 天下一家:網絡聯通世界(科學新導向叢書)
- Hands-On Full Stack Web Development with Aurelia