bs4库的prettify()方法|粉饰的意思。就是多了换行!
单独执行:【未经过print输出!】.soup.prettify():就是多带了个换行符号!代码:import requestsfrom bs4 import BeautifulSoupr = requests.get("https://python123.io/ws/demo.html")demo = r.textsoup = BeautifulSoup(dem...