我想使用JSON保存视频的标题,因为我有视频ID(self.video_id)。现在我有:
require 'json'
data = JSON.parse(open("https://www.googleapis.com/youtube/v3/videos?id=#{self.video_id}&key=APIKEYw&fields=items(snippet(title))&part=snippet").read)
name = data["items"][0]["snippet"]["title"]
我收到错误:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed