os模块为python解释器与操作系统交互的接口 os.popen() -------Open a pipe to or from command. The return value is an open file object connected to the pipe m=os.popen('dir') #执行系统命令列出当前目录下的文件目录,保存在变量m中 print m #<open file 'dir', mode 'r' at 0x00000000030F5540>m为保存在内…
代码: var http = require("http"); var cheerio = require("cheerio"); var url = 'http://www.imooc.com/learn/348'; http.get(url, function(res){ var html = ''; res.on('data', function(data){ html += data; }); res.on('end', function(){ var co…