|
|
@ -87,9 +87,13 @@ def fetch_video(id, client)
|
|
|
|
html = XML.parse_html(html)
|
|
|
|
html = XML.parse_html(html)
|
|
|
|
info = HTTP::Params.parse(info)
|
|
|
|
info = HTTP::Params.parse(info)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if info["reason"]?
|
|
|
|
|
|
|
|
info = client.get("/get_video_info?video_id=#{id}&ps=default&eurl=&gl=US&hl=en").body
|
|
|
|
|
|
|
|
info = HTTP::Params.parse(info)
|
|
|
|
if info["reason"]?
|
|
|
|
if info["reason"]?
|
|
|
|
raise info["reason"]
|
|
|
|
raise info["reason"]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
title = info["title"]
|
|
|
|
title = info["title"]
|
|
|
|
|
|
|
|
|
|
|
|