我正在尝试使用 htmlparser2 ( https://www.npmjs.com/package/htmlparser2 ) 将 html 原始字符串解析为 json。
但它的用法只注销标签/文本,我想要的是像它的 livedemo ( http://demos.forbeslindesay.co.uk/htmlparser2/ ) 这样的 json ,这样我就可以过滤我想要的元素。
任何帮助或建议将不胜感激!
javascript json html-parsing
html-parsing ×1
javascript ×1
json ×1