From f342ad6cd4c8e9dd8f7645e2cd3c4aa2df72db54 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 6 Feb 2020 19:15:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=A7=86=E9=A2=91=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/get_video_data.rake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tasks/get_video_data.rake b/lib/tasks/get_video_data.rake index 644168699..c7e09bfa1 100644 --- a/lib/tasks/get_video_data.rake +++ b/lib/tasks/get_video_data.rake @@ -46,7 +46,9 @@ namespace :video do task :get_play_url => :environment do Video.all.each do |video| result = AliyunVod::Service.get_play_info(video.uuid) - play_url = (result.dig('PlayInfoList', 'PlayInfo') || []).first&.[]('PlayURL') + puts result + play_url = data[:PlayInfoList][:PlayInfo][:PlayURL] + # play_url = (result.dig('PlayInfoList', 'PlayInfo') || []).first&.[]('PlayURL') video.update!(play_url: play_url) if play_url.present? end