function issupport(url)
    if url:match("^http://info.smgbb.cn/") then return true end
    return false   
end

function analyze(url)
    print('-----------------------Enter analyze-----------------------')

    require('common')
    local json = require('json')
    print('url:'..url)

    local id = url:match('%/(%d+).html')
    print('id:'..id)
        
    local xmlurl = 'http://www1.smgbb.cn/playxml/statdir/'..(id%100)..'/playlist'..id..'.xml'
    print(xmlurl)
    
    local xmldata = idown.requesturl(xmlurl)
    --print(xmldata)
    
    local title, realurl = xmldata:match('playing title ="([^"]+)" url ="([^"]+)"')
    local realfilename = title..getsuffix(realurl)
    	
    local result = {}
	result.realurl = realurl
	result.title = title
	result.realname = realfilename
	result.encode = 65001
	
	local retstr = json:encode(result)
    
    print('-----------------------Leave analyze-----------------------')
	return 1, retstr
end