Skip to content

Commit

Permalink
[fix] : crawling selector 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
MinkeySon committed Jan 6, 2024
1 parent 27eaca6 commit 49eef9e
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@ public StockPriceResponseDto getStock(String stockCode) throws IOException, JSON

stockPriceResponseDto.setStock_coin(String.valueOf(Double.parseDouble(priceText)/100)); // 스톡가

String rate = changeJSoup(doc,"#content > div.section.trade_compare > table > tbody > tr:nth-child(2) > td:nth-child(2) > em");
rate = rate.substring(3,6);
String rate = changeJSoup(doc,"#chart_area > div.rate_info > div > p.no_exday > em:nth-child(2) > span.no0");

stockPriceResponseDto.setPreparation_day_before(rate.trim()); // 전일 대비
stockPriceResponseDto.setPreparation_day_before(rate); // 전일 대비

stockPriceResponseDto.setPreparation_day_before_sign("4"); // 전일 대비 부호

Expand Down

0 comments on commit 49eef9e

Please sign in to comment.