小编Fli*_*int的帖子

Beautifulsoup 4:删除评论标签及其内容

所以我正在报废的页面包含这些HTML代码.如何<!-- -->使用bs4删除评论标记及其内容?

<div class="foo">
cat dog sheep goat
<!-- 
<p>NewPP limit report
Preprocessor node count: 478/300000
Post?expand include size: 4852/2097152 bytes
Template argument size: 870/2097152 bytes
Expensive parser function count: 2/100
ExtLoops count: 6/100
</p>
-->

</div>
Run Code Online (Sandbox Code Playgroud)

html python beautifulsoup html-parsing web-scraping

14
推荐指数
2
解决办法
1万
查看次数

从python启动gnu屏幕?

我尝试从子进程调用执行带有gnu屏幕的服务器守护程序,但它甚至没有启动

subprocess.call(["screen", "-dmS test ./server"])
Run Code Online (Sandbox Code Playgroud)

我被告知运行屏幕需要终端,因此我不能简单地通过调用执行它.你能告诉我一些代码吗?

python terminal subprocess gnu-screen

3
推荐指数
1
解决办法
2439
查看次数