home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2008 May
/
PCWorld_2008-05_cd.bin
/
komunikace
/
bitcomet
/
bitcomet_setup.exe
/
scripts
/
soft_mydrivers.lua
< prev
next >
Wrap
Text File
|
2007-07-06
|
878b
|
36 lines
function url_process(linkurl, fileurl, str)
local pattern_name = "<[Dd][Ii][Vv] class=biaoti>%s*(.-)%s*</[Dd][Ii][Vv]>"
local pattern_ext = ".*(%..-)$"
local start, _, tmp
local base_name, ext
start, _, tmp = string.find(str, pattern_name)
if start == nil then return "" else base_name = tmp end
base_name = string.gsub(base_name, "<WBR>", "")
start, _, tmp = string.find(linkurl, pattern_ext)
if start == nil then return "" else ext = tmp end
return base_name .. ext
end
function url_query(str)
local start
local url_table = {}
pattern_url = "http://drivers%.mydrivers.com/download/"
start = string.find(str, pattern_url)
if start ~= nil then return true end
return false
end
f = {}
f.process = url_process
f.accept = url_query
inteligent_name_table["soft_mydrivers.lua"] = f