chore : deploy 수정

This commit is contained in:
2026-08-11 17:55:45 +09:00
parent a7077fc693
commit fd26a086f7
41 changed files with 23249 additions and 3 deletions
@@ -0,0 +1,44 @@
package company.specialsource.scraper;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.io.InputStream;
import static org.assertj.core.api.Assertions.assertThat;
class DetailParserTest {
private Document loadFixture(String fileName) throws IOException {
try (InputStream in = getClass().getResourceAsStream("/scraper/" + fileName)) {
assertThat(in).as("fixture %s must exist", fileName).isNotNull();
return Jsoup.parse(in, "UTF-8", "https://bbs.ruliweb.com/");
}
}
@Test
void ruliwebPostDetailParser_extractsTextAndImages() throws IOException {
Document doc = loadFixture("ruliweb_post_market.html");
PostDetail detail = new RuliwebPostDetailParser().parse(doc);
assertThat(Jsoup.parse(detail.content()).text()).contains("핫딜관리자입니다");
assertThat(detail.content()).contains("<img");
assertThat(detail.imageUrls()).isNotEmpty();
assertThat(detail.imageUrls().get(0)).startsWith("https://");
}
@Test
void dcPostDetailParser_extractsTextAndImages() throws IOException {
Document doc = loadFixture("dc_post.html");
PostDetail detail = new DcPostDetailParser().parse(doc);
assertThat(Jsoup.parse(detail.content()).text()).contains("출퇴근 소요 시간");
assertThat(detail.content()).contains("<img");
assertThat(detail.imageUrls()).isNotEmpty();
assertThat(detail.imageUrls().get(0)).contains("dcinside.co.kr");
}
}