From d95fd0496a7eb38bc84b7a53591e2bd48da9a23c Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 24 Jun 2022 17:02:46 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=82=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../videoPreview/domain/BaoTouVideoPreviewService.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/videoPreview/domain/BaoTouVideoPreviewService.java b/renren-admin/src/main/java/io/renren/modules/resource/videoPreview/domain/BaoTouVideoPreviewService.java index b76882b7..f628a5da 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/videoPreview/domain/BaoTouVideoPreviewService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/videoPreview/domain/BaoTouVideoPreviewService.java @@ -33,10 +33,14 @@ public class BaoTouVideoPreviewService extends AbstractVideoPreviewService { @Override public String getHls(String key) { String hls = null; - Request request = new Request.Builder().url(String.format(baoTouProperties.getHlsurl(), key)).build(); + String url = String.format(baoTouProperties.getHlsurl(), key); + logger.info("包头预览:" + url); + Request request = new Request.Builder().url(url).build(); try (Response response = client.newCall(request).execute()) { if (response.isSuccessful()) { - JSONObject jsonObject = JSON.parseObject(response.body().string()); + String body = response.body().string(); + logger.error("包头预览返回:" + body); + JSONObject jsonObject = JSON.parseObject(body); if (jsonObject.containsKey("data")) { hls = jsonObject.getString("data"); }