function issupport(url)
    if url:match("^http://%w+.gokuai.com/") then return true end
    return false   
end


require('common')
local json = require('json')
function analyze(url)
    print('-----------------------enter analyze-----------------------')
    print('url:'..url)
    page1=idown.requesturl(url,'','')
    local agent = 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)'
    realurl=string.match(page1,'<a class="download_now" href="([^"]*)">')
    print(realurl)
    realname=string.match(page1,'filename:"([^"]*)",')
    print(realname)
    print(idown.toansi(realname))
    title=string.match(realname,'(.*).')
    result = {}
    result['realurl'] = realurl
    result['title'] = title
    result['realname'] = realname
    result['encode'] = 65001
    retstr = json:encode(result)
	print('ret:'..retstr)
    

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