Skip to content

Commit

Permalink
feat: enhance post analyze method
Browse files Browse the repository at this point in the history
- 이미지 분석이 없는 경우 Vision API를 호출하지 않도록 수정
- 이미 알려진 리뷰 사이트 체크 시, 불필요한 prefix 삭제
  • Loading branch information
seokwns committed Jan 14, 2024
1 parent cb54d72 commit 31cf002
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public GoogleVisionAPI(@Autowired @Qualifier("googleWebClient") WebClient google
}

public List<String> call(List<ImageParseRequest> requests) {
if (requests.isEmpty()) {
log.debug("Vision API 요청 내용 없음.");
return List.of();
}

log.debug("Vision API 요청 생성 시작");
List<RequestIterator> requestIterators = requestConverter.getRequestIterators(requests, features);
List<RequestItem> items = requestConverter.getRequestItems(requestIterators);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public void saveAll(List<ParsedImage> images) {

@Override
public Boolean isWellKnownURL(String url) {
return url.contains("http://blogmall.net/campaign/blogWidget/")
|| url.contains("https://xn--939au0g4vj8sq.net/_sp/wg.php")
|| url.contains("https://www.revu.net/campaign/img.php");
return url.contains("blogmall.net/campaign/blogWidget/")
|| url.contains("xn--939au0g4vj8sq.net/_sp/wg.php")
|| url.contains("www.revu.net/campaign/img.php");
}
}

0 comments on commit 31cf002

Please sign in to comment.