https://markdown-1303167219.cos.ap-shanghai.myqcloud.com/57000045

伤心肠粉的酱油碟子

doctest

doctest Doctest 的测试原理是把我们在 Python 控制台的输入输出记录保存到函数的 docstring 里,然后一一把这些输

BeautifulSoup4

BeautifulSoup4 基本操作 导入 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 from bs4 import BeautifulSoup html_doc = """ <html><head><title>The Dormouse's story</title></head> <body> <p class="title"><b>The Dormouse's story</b></p> <p class="story">Once upon