简体   繁体   English

NodeJ:从响应主体的特定标签中提取数据

[英]NodeJs: Extract data from particular tag from body of response

How can I get data from only tags from http get request's response body in node js. 如何仅从节点js中的http get请求的响应正文中的标签中获取数据。 Can I get something like findByElementName or something similar? 我可以得到类似findByElementName之类的东西吗?

If you looking to parse HTML with node js, look at this if you want to do it with XPATH https://github.com/goto100/xpath 如果您想使用节点js解析HTML,请使用XPATH https://github.com/goto100/xpath进行此操作

Or https://github.com/cheeriojs/cheerio if you want to use selector like in JQUERY https://github.com/cheeriojs/cheerio,如果您想在JQUERY中使用选择器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM