- 查询当前Python可以安装的模组版本
#module version 20.5.25
import setuptools.pep425tags
print(setuptools.pep425tags.get_supported())
- 利用urllib、bs爬取HTML内容
import urllib.request
from bs4 import BeautifulSoup
res=urllib.request.urlopen('https://test.nemo.ren')
bsObj = BeautifulSoup(res.read(), "html.parser")
print(bsObj.h1)