【发布时间】:2022-01-26 13:28:08
【问题描述】:
邮递员请求返回 html 页面。在邮递员测试中使用cheerio,我得到了我需要从中提取更具体值的标签,cheerio 代码是:
const $ = cheerio.load(pm.response.text());
postman.setEnvironmentVariable("the_tag", $('body script'));
这给了我:
< script type = "text/javascript" > $(function () {
some_func(arg1, arg2, arg3, arg4);
});
< / script >
现在,在 some_func 调用中获取 arg3 值的正确 Cheerio 代码是什么?
【问题讨论】:
标签: postman html-parsing cheerio