pip3 install beautifulsoup4
如果使用國外的源下載速度慢,我們可以使用國內的源進行提速:
- 豆瓣源
pip3 install beautifulsoup4 -i https://pypi.douban.com/simple
- 清華大學源
pip3 install beautifulsoup4 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install beautifulsoup4
如果使用國外的源下載速度慢,我們可以使用國內的源進行提速:
pip3 install beautifulsoup4 -i https://pypi.douban.com/simple
pip3 install beautifulsoup4 -i https://pypi.tuna.tsinghua.edu.cn/simple
1.while循環的格式 while 條件: 條件滿足時,做的事情1 條件滿足時,做的事情2 條件滿足時,做的事情3 ...(省略)... demo