function issupport(url)
    if url:match("^http://tv.sohu.com/") then return true end
    return false   
end
require('common')
local json = require('json')
function analyze(url)
	print('-----------------------enter analyze-----------------------')
	print('url:'..url)
	local agent = 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)'
	local page1 = idown.requesturl(url,'', '')
	local id=string.match(page1,'vid="(%d*)"') or page1:match("vid%s*=%s*'(.-)'") or page1:match("vid=(%d+)")
	print('id:',id)

	url2 = string.format('http://hot.vrs.sohu.com/vrs_flash.action?vid=%s',id)
	--通过下载页面获得原始下载地址
    page3 = idown.requesturl(url2)
    print(page3)
    data = json:decode(page3)
    print('-------------------------------ssssssss----------------------')
    a=data.data.clipsURL
    realurl=''
    for i,v in ipairs(a) do
        linkurl=string.gsub(v,'http://data.vod.itc.cn','')  
        ip=data.allot
        newurl=data.data.su[i]
	if newurl == ''then
	else
        url3=("http://"..ip.."/?prot2&file="..linkurl..'&new='..newurl)
	end
        realurl=realurl..url3
	if not (i == #a) then
	realurl=realurl..'\n'
	end
    end
    realname= data.data.tvName
    print(idown.toansi(realname))
    --获取文件后缀
    suffix =getsuffix(getfilename(linkurl))
    realfilename=realname..suffix
    result = {}
	result['agent'] = agent 
    result['realurl'] = realurl
    result['title'] = realname
    result['realname'] = realfilename
    result['encode'] = 65001
    retstr = json:encode(result)
	print('ret:'..retstr)
	print('-----------------------leave analyze-----------------------')
    return 1,retstr
end
