首页 > 解决方案 > 如何在 node.js 上使用cheerio 获得价值

问题描述

如何在node.js上使用cheerio获得代码的IMVALUE?

元素/视图源:

<div class="e7m mess_bodiyy">
  <p style="max-width: 600px">
    Hello x7907062441,
    <br />
    <br />
    This is the value:
    <br />
    <a href="http://mywebsite.com" target="_blank" rel="nofollow">
      IMVALUE
    </a>
    .<br />
    <br />
  </p>
</div>

我试过了

const src = $('<div class="e7m mess_bodiyy"></div>').

但结果是不确定的。

标签: javascriptnode.jscheerio

解决方案


推荐阅读