将元素作为最后一个元素插入
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)
【声明】:唐山站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。