File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
SouP/src/main/java/Matching/SouP/crawler/Hola Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public void getHolaPostData(){
39
39
log .warn ("글 갯수 = {} " ,count );
40
40
for (int i = count ; i > 0 ; i --) {
41
41
if (i ==count ){
42
- driver .findElement (By .cssSelector ("#root > main > ul > a:nth-child(2 )" )).click ();
42
+ driver .findElement (By .cssSelector ("#root > main > ul > a:nth-child(1 )" )).click ();
43
43
String first = driver .getCurrentUrl ().substring (beginIndex );
44
44
if (first .compareTo (standard ) <= 0 ) {
45
45
log .warn ("사이트 내 가장 최신글 번호 = {}, 따라서 불러올 글이 없습니다!" ,first );
@@ -48,7 +48,7 @@ public void getHolaPostData(){
48
48
else
49
49
driver .navigate ().back ();
50
50
}
51
- int aSelector = i *2 ; // 짝수번만 사용 예정
51
+ int aSelector = i *2 - 1 ; // 홀수번만 사용 예정
52
52
Elements eachPost = element .select ("a:nth-child(" + aSelector + ")" );
53
53
driver .get (urlHola + eachPost .attr ("href" ));
54
54
Thread .sleep (500 );
You can’t perform that action at this time.
0 commit comments