将元素作为最后一个元素插入
HTML页面主体的最有效方法是什么?
解决方法
按照相同的方式查看我对上一个问题的回答:
> Extract all <script> tags in an HTML page and append to the bottom of the document
以下应该插入正常:
soup.body.insert(len(soup.body.contents),yourelement)
将元素作为最后一个元素插入
HTML页面主体的最有效方法是什么?
按照相同的方式查看我对上一个问题的回答:
> Extract all <script> tags in an HTML page and append to the bottom of the document
以下应该插入正常:
soup.body.insert(len(soup.body.contents),yourelement)