function issupport(url)
    if url:match("^http://kuai.xunlei.com/") then return true end
    return false   
end

function analyze(url)
    require('common')
    local json = require('json')
    require("xml")

    print('-----------------------enter analyze-----------------------')
    print('url:'..url)
    
    local page1=idown.requesturl(url)

    realname,realurl = page1:match('<a class="file_name" title="(.-)" href="(.-)"')
    if realname == nil then 
    realname = page1:match('file_name="(.-)"')
    realurl = page1:match('file_url="(.-)"')
    end

    local result = {}
    result['realurl'] = realurl
    result['title'] = realname
    result['realname'] = realname
    result['encode'] = 65001
    retstr = json:encode(result) 
    print('ret:'..retstr)
    
    print('-----------------------leave analyze-----------------------')
    return 1,retstr
end
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
  