Skip to content

Commit

Permalink
fix: 크롤링 당일 것만 되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
mclub4 authored May 22, 2024
1 parent 4f27712 commit 2cf4567
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void crawlKookminAnnouncement(AnnouncementUrl url) {
String dateStr = announcement.select(".board_etc > span").first().text();
LocalDate noticeDate = LocalDate.parse(dateStr, formatter);

if (noticeDate.equals(currentDate) || noticeDate.isEqual(currentDate.minusDays(1))) {
if (noticeDate.equals(currentDate)) {
String href = announcement.attr("href");
links.add(href);
}
Expand Down Expand Up @@ -251,7 +251,7 @@ public void crawlSoftwareAnnouncement(AnnouncementUrl url) {
String dateStr = announcement.select(".date").text();
LocalDate noticeDate = LocalDate.parse(dateStr, formatter);

if (noticeDate.equals(currentDate) || noticeDate.isAfter(currentDate.minusDays(4))) {
if (noticeDate.equals(currentDate)) {
String href = announcement.select(".subject > a").attr("href");
links.add(href.substring(1, href.length()));
}
Expand Down

0 comments on commit 2cf4567

Please sign in to comment.