-- http://www.solidfiles.com/d/* -- http://www.solidfiles.net/d/* function GDL(origUrl) logpref = script.name..'_GDL_0007' usd.setstatus(logpref:gsub('_GDL_',' ')) local page, err, dirUrl origUrl = origUrl:gsub('%x+$','%1/') page = usd.get(origUrl) debugSaveInc(logpref..'.html', page) dirUrl = page:match('//(s%d+%.solidfilesusercontent%.[^"]+)"') if not dirUrl then err = page:match('<h2[^>]+>(.-)<') or page:match('class="file clearfix">(.-)<') or page:match('GET Error:%s?(.-)%c') if err then if err == 'NOT FOUND' then return usd.setretresult('%notfound%') end return usd.setretresult('Error: '..err:gsub('%s+',' ')) end return usd.setretresult('%dirUrl not found') end usd.savetolog(dirUrl) dirUrl = dirUrl:match('(.-)&') or dirUrl usd.setretresult('http://'..dirUrl, math.random(1,4),1) return end regDirSuccess( 'solidfiles.com/d/', GDL, OS ) regDirSuccess( 'solidfiles.net/d/', GDL, OS ) |