0
웹 사이트에서 데이터를 추출해야하는 API 작업 중입니다.JSOUP으로 데이터 추출하기
웹 사이트 소스 코드 예제 :
<td class="a">Date 1</td>
<a class = b">Comment</a>
<a class = b">Comment</a>
<a class = b">Comment</a>
<a class = b">Comment</a>
<td class="a">Date 2</td>
<a class = b">Comment</a>
<a class = b">Comment</a>
<a class = b">Comment</a>
<td class="a">Date 3</td>
<a class = b">Comment</a>
<a class = b">Comment</a>
<a class = b">Comment</a>
나는 날짜에 따라 3 별도의 전망에 JSOUP 데이터를 추출하기 위해 찾고 있어요.
그래서 기본적으로 Elements 요소를 사용하고 싶습니다. document.select ("a [class = b]"); 그래서 그것은 날짜 1과 날짜 2, 날짜 2와 날짜 3, 날짜 3 사이의 데이터 만 선택합니다 ...
나는 nextSibling()과 hasNext()를 사용하여 시도했지만 작동하지 않는 것 같습니다.