function issupport(url)
	if url:match('^http://www.9ku.com/play/%d+.htm') then return true end
	return false
end

function analyze(url)
    require('common')
	local json = require('json')
	local page = idown.requesturl(url)

	local songdata = page:match("song_data%[0%]='(.-)'")
	print(songdata)
	
	--<script src="http://url.9ku.com/index.asp?2011-12-31"
    local urlpage = page:match('<script src="(http://url.9ku.com/index.asp?[^"]+)"')
    print(urlpage)
    local page2 = idown.requesturl(urlpage, '', url)
    print(page2)
    local dzurl = page2:match('var DzUrl="(.-)"')
    print(dzurl)
	
	local tInfo = split(songdata, '|')					
	local title = tInfo[2]..'-'..tInfo[4]
	local realurl = dzurl..tInfo[5]
	
	local realfilename = title..getsuffix(realurl)
	print('realfilename:'..realfilename)
		
	local result = {}
	result['realurl'] = realurl
	result['title'] = title
	result['realname'] = realfilename
	result['agent'] = 'Windows-Media-Player/11.0.5721.5280'

	retstr = json:encode(result)
	print('ret:'..retstr)
	
	return 1, retstr	
end