require('idownx')

function issupport(url)
    local protocol = url:match("^(.*)://")
    print(protocol)
    if(protocol:lower() == "http")then return true end
    return false
end

function analyze(url)
    local realname = getfilename(url)
    local ret={
        realname=realname,
        realurl=url,
        title=realname,
    }
    
    return idown.ERR_SINGLE_FILE, idown.encode(ret)
end