From e3ab087bf863e192ebbf5f66be434f06108f4883 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 6 Feb 2020 19:22:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/get_video_data.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/get_video_data.rake b/lib/tasks/get_video_data.rake index dc1121377..6daacc49f 100644 --- a/lib/tasks/get_video_data.rake +++ b/lib/tasks/get_video_data.rake @@ -47,7 +47,7 @@ namespace :video do Video.all.each do |video| result = AliyunVod::Service.get_play_info(video.uuid) puts result - play_url = result["PlayInfoList"]["PlayInfo"]["PlayURL"] + play_url = result["PlayInfoList"]["PlayInfo"].first&.[]('PlayURL') puts play_url # play_url = (result.dig('PlayInfoList', 'PlayInfo') || []).first&.[]('PlayURL')