Skip to content

Commit ef692dc

Browse files
authored
Merge pull request #110 from Team-Wable/fix/#109
[FIX] curation crawling api
2 parents 8157243 + a423fad commit ef692dc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

WableServer/src/main/java/com/wable/www/WableServer/api/curation/service/CurationCommandService.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ public void postCuration(CurationPostRequestDto curationPostRequestDto) {
2626
String thumbnail = null;
2727

2828
try {
29-
Document doc = Jsoup.connect(link).get();
29+
Document doc = Jsoup.connect(link)
30+
.userAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) " +
31+
"AppleWebKit/537.36 (KHTML, like Gecko) " +
32+
"Chrome/120.0.0.0 Safari/537.36")
33+
.timeout(5000)
34+
.get();
3035

3136
Element ogTitle = doc.selectFirst("meta[property=og:title]");
3237
if (ogTitle != null) {

0 commit comments

Comments
 (0)