Your URI query is not valid. There are several characters that you should encode with URI::encode()
. For instance, #
,
, or &
are not valid in a query.
Below a working version of your code
require 'uri'
plContext = URI::encode("http://ferrari-%201363948628-stream.4mecloud.it/live/ferrari/ngrp:livegenita/manifest.f4m")
cartellaConfig = URI::encode("http://ferrari-4me.weebo.it/static/player/config/")
cartellaLingua = URI::encode("http://ferrari-4me.weebo.it/static/player/config/")
poster = URI::encode("http://pusher.newvision.it:8080/resources/img1.jpg")
urlSkin = URI::encode("http://ferrari-4me.weebo.it/static/player/swf/skin.swf?a=1363014732171")
target_url = URI::encode("http://ferrari-4me.weebo.it/static/player/swf/player.swf")
url = "https://ferrari-view.4me.it/view-share/playerp/?"
url << "plContext=#{plContext}"
url << "&cartellaConfig=#{cartellaConfig}"
url << "&cartellaLingua=#{cartellaLingua}"
url << "&poster=#{poster}"
url << "&urlSkin=#{urlSkin}"
url << "&method=GET"
url << "&target_url=#{target_url}"
url << "&userLanguage=IT"
url << "&styleTextColor=#{URI::encode("#000000")}"
url << "&autoPlay=true&bufferTime=2&isLive=true&gaTrackerList=UA-23603234-4"
url << "&highlightColor=#{URI::encode("#eb2323")}"
puts url
puts URI.parse(url).host