Skip to content

Commit

Permalink
Merge pull request #86 from BLink-Org/dev
Browse files Browse the repository at this point in the history
Refactor: ๋กœ๊น… ์ฝ”๋“œ ์ถ”๊ฐ€
  • Loading branch information
suminnnnn authored Mar 1, 2025
2 parents 718dc5d + 6dc9e3a commit df3e10a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.google.api.services.youtube.YouTubeRequestInitializer;
import com.google.api.services.youtube.model.Video;
import com.google.api.services.youtube.model.VideoListResponse;
import lombok.extern.slf4j.Slf4j;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
Expand All @@ -27,6 +28,7 @@
import java.util.Random;

@Component
@Slf4j
public class DefaultLinkInfoExtractor implements LinkInfoExtractor {

private static final List<String> USER_AGENT_LIST = Arrays.asList(
Expand Down Expand Up @@ -294,6 +296,8 @@ private LinkResponse.LinkInfo fetchRedditLinkInfo(String url) {

return LinkMapper.toLinkInfo(title, "Reddit", contents, imageUrl);
} catch (Exception e) {
log.error("Reddit ๋งํฌ ์ •๋ณด ์ถ”์ถœ ์ค‘ ์˜ˆ์™ธ ๋ฐœ์ƒ - URL: {}\nMessage: {}\nStack Trace: {}",
url, e.getMessage(), Arrays.toString(e.getStackTrace()));
throw new LinkException(ErrorCode.LINK_SCRAPED_FAILED);
}
}
Expand Down

0 comments on commit df3e10a

Please sign in to comment.