- Python Web Scraping Cookbook
- Michael Heydt
- 81字
- 2021-06-30 18:43:57
How it works
The only difference in this recipe is how we fetch the resource:
req = urllib3.PoolManager()
res = req.request('GET', url)
Unlike Requests, urllib3 doesn't apply header encoding automatically. The reason why the code snippet works in the preceding example is because BS4 handles encoding beautifully. But you should keep in mind that encoding is an important part of scraping. If you decide to use your own framework or use other libraries, make sure encoding is well handled.
推薦閱讀
- C++黑客編程揭秘與防范
- 物聯網之魂:物聯網協議與物聯網操作系統
- 異構基因共表達網絡的分析方法
- Building RESTful Web Services with Spring 5(Second Edition)
- 物聯網時代
- React:Cross-Platform Application Development with React Native
- Learning Swift(Second Edition)
- Building RESTful Web services with Go
- 物聯網之霧:基于霧計算的智能硬件快速反應與安全控制
- 光纖通信系統與網絡(修訂版)
- Working with Legacy Systems
- Getting Started with tmux
- 通信系統實戰筆記:無處不在的信號處理
- Building Microservices with Spring
- XSS跨站腳本攻擊剖析與防御