function issupport(url)
    if url:find("http://www.vvvdj.com") then return true end
    return false
end

function analyze(url)
	print('-----------------------Enter analyze-----------------------')
	print('url:'..url)
    local json = require('json')
    require('common')
	local page1 = idown.requesturl(url)
    local realurl = 'mms://t1.vvvdj.com/dj2/'..page1:match('surl%+"([^"]-)"')
	local title = page1:match('var n ="(.-)"')
    local realfilename = title..getsuffix(realurl)
    
	--get auth code
	req = {}
	req['headers'] = {}
	req['headers']['Referer'] = url
	page2, head2 = idown.requesturl("http://www.vvvdj.com/inc/", '', json:encode(req))
	--print(head2)
	--print(page2)
	realurl = realurl.."?"..page2:match('UUAuthCode="([^"]-)"')
	realurl = realurl:gsub('mms://','rtsp://')
	print('realurl:'..realurl)
	
	pin = head2:match('pin=([%w%d]+)')
	tflag = head2:match('tflag=([%w%d]+)')
    
	result = {}
	result['realurl'] = realurl
	result['title'] = title
	result['realname'] = realfilename
	result['agent'] = 'NSPlayer/11.0.5721.5275 WMFSDK/11.0'
		
	retstr = json:encode(result)
	print('ret:'..retstr)

	print('-----------------------Leave analyze-----------------------')
	return 1, retstr
end