Bovski, CuF.. hopefully you guys can review and let me know if you have any concerns or suggestions on these engine changes
ok.. made some changes i think should work. added a new script header flag "
initialize=1" which will trigger the code section labeled
[initialize] to be processed before any searching. this allows you to modify any of the search variables, including new
@search,
@profile and also use the read-only
$descriptions.
side note, also fixed
-the redirect '//' bug for toggling same HTTP or HTTPS protocol as the referrer
-'Locate' button in the script debugger for 'find() and extract()'
-properly urlencode the @search (uses Win32 API.. so for example " " is converted to "%20" instead of "+"... also takes care of all the other characters)
[script]
name=HDbits.org
source=HDbits
author=CuF
modified=CuF 2013/01/28, chip 2013/04/17
pwd=1
version=2
initialize=1
[home]
1=https://hdbits.org
[profiles]
all=/browse.php?incldead=0&search=%SEARCH%
video=/browse.php?c3=1&c4=1&c1=1&c5=1&c2=1&incldead=0&search=%SEARCH%
audio=/browse.php?c6=1&incldead=0&search=%SEARCH%
[login]
prelogin=code(`/login?returnto=%2F`,0)
login=https://hdbits.org/login/doLogin
form=uname=%USER%&password=%PASS%&lol=%LOL%
failed=Type in your username and password
failed2=action="/login/doLogin"
[initialize]
@search=put(`new test search`)
if ($descriptions=1) then
@profile=&(@profile,`&incdes=true`)
end if
[/initialize]
[code0]
@i=find(@i,@data,`name="lol"`,`value=`)
num=extract(@i,@data,`"`,`"`)
$form=replace($form,`%LOL%`,num)
[/code0]
[code1]
x=findh(x,@data,`Upped by`,`<tr`)
z=find(x,@data,`</table>`)
@data=crop(@data,x,z)
@data=vacuum(@data)
@data=replace(@data,`<br />`,` `)
@r=split(@data,`</tr>`)
start
@q=split(@r,`</td>`)
t=array(@q,2)
@i=find(@i,t,`href=`)
$page=extract(@i,t,`"`,`&`,`https://hdbits.org`)
$name=extract(@i,t,`>`,`<`)
@i=find(@i,t,`href=`)
$torrent=extract(@i,t,`"`,`"`,`https://hdbits.org/`)
$date=array(@q,4)
$size=array(@q,5)
$seeds=array(@q,7)
$leeches=array(@q,8)
aloop
[/code1]