我正在使用Java和Jsoup以及我试图利用的HTML部分
<i class="fa fa-star"></i> <a href="#taskruns" data-toggle="tab">396900 runs submitted</a>
我只需要提取标题&#34; 396900&#34;
我该怎么做呢?我在解析和网页抓取方面相当新鲜
答案 0 :(得分:0)
这是如何从html确定文本的。
import React from 'react';
const InnerCard = (props) => {
// const myInnerOptions =
const myInnerOptions = props.cardSelected
for (let [key, value] of Object.entries(myInnerOptions)) {
console.log(`key: ${key} Card Value: ${value} this is from
InnerCards.js`);
return (
<div key={key}>inside innerCard: {value}</div>
)
} /* NOTE at this point I am having a problem.
// thos will only print 1 div it will only push the first key
// div out not the second. props should be pushing an array of
2 items up. */
console.log(props.cardSelected, 'here here');
//for (let [key, value] of Object.entries())
return (
<div>{myInnerOptions}</div>
);
}
export default InnerCard;
您可以从here了解详情。