Convivea
Bit Che => Bugs & Feature Requests => Topic started by: chip! on April 15, 2013, 02:19:06 am
-
appears some times having a space in the %search% needs to be translated to %20 instead of "+"
-
Yes some times it does I have mentioned we need to be able to manipulate the %search% and even the whole line some sites allow for tittle or description searches so we need to modify the string to match if the user has selected "Include description searches"
-
i gotcha.. do you have any site examples where the search is changed for description searches so I can start to conceptualize on how to change the script structure? for example, code0 is already dedicated to prelogin processing, but to your point, seems like we need a "pre-connection" code section prior to any http requests..
just brainstorming.. lets say a flag 0 or 1 is passed to this function based on whether 'description searches' are checked ($descriptions).. then an IF THEN section can be processed to manipulate %search%.. hmm..
-
i'm exposing @profile (search URL), @search (search terms) , and $desc (1 if include description searches, 0 if not) to the script engine.. and also added ability for ['code] section to be processed before launching any http connection.. more to come later.
-
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]
-
posted build 62 here: http://convivea.com/forums/index.php?topic=2131.msg20265#msg20265 (http://convivea.com/forums/index.php?topic=2131.msg20265#msg20265)