Bit Che > Scripts & Development
Pirate Party Proxy's
chip!:
ok, here we go. i think this is better:
1. @url is now an automatic real variable if the script has a mirror URL identified. if NO mirror is used, then this is filled with home= so that @url can be used in any script.
2. %MIRROR% will still have a pure string replacement in the script code (but I will probably leave this undocumented, and if so, then remove it later).
3. when using a mirror, home= is removed and uses the correct mirror URL
4. mirror URL index is now stored into the script pack settings file, for example: bcs.default.ini
5. the GUI menu to toggle the 'mirrors' is renamed to read 'Use URL -> LIST'
--- Code: ---
[script]
name=PirateBay.se
source=PirateBay.se
author=chip
modified=Bovski(ASC) 2011/05/29
enabled=1
version=2
cookie=tpb=1;
[mirrors]
1=http://thepiratebay.se
2=https://tpb.pirateparty.org.uk
[profiles]
all=%MIRROR%/search/%SEARCH%/0/99/0
audio=%MIRROR%/search/%SEARCH%/0/99/100
video=%MIRROR%/search/%SEARCH%/0/99/200
apps=%MIRROR%/search/%SEARCH%/0/99/300
games=%MIRROR%/search/%SEARCH%/0/99/400
[code1]
x=findh(x,@data,`searchResult`,`</tr`,`>`,)
z=find(x,@data,`</table>`)
@data=crop(@data,x,z)
@data=vacuum(@data)
@data=replace(@data,`</TD>`,`<!--EOL--></TD>`)
@data=replace(@data,` TiB`,` TB<!--EOS-->`)
@data=replace(@data,` GiB`,` GB<!--EOS-->`)
@data=replace(@data,` MiB`,` MB<!--EOS-->`)
@data=replace(@data,` KiB`,` KB<!--EOS-->`)
@r=split(@data,`</tr>`)
start
@q=split(@r,`</td>`,2)
t=array(@q,1)
$page=extract(@i,t,`href="`,`"`,@url)
$name=extract(@i,t,`title="details for`,`"`)
$torrent=extract(@i,t,`href="`,`"`,@url)
k=find(1,$torrent,`magnet:?`)
if (k>0) then
$torrent=mid($torrent,k)
end if
@i=find(@i,t,`"detDesc">Uploaded`)
$size=extract(@i,t,`Size `,`<!--EOS-->`)
$seeds=array(@q,2)
$leeches=array(@q,3)
aloop
[/code1]
--- End code ---
chip!:
menu shot for URL switch
and Script Debug is updated.. added 'Response From: [HTTP RESPONSE URL]'
and added button to show 'HTTP HEADERS' if desired.
and included '@url' variable
Bovski:
Nice additions to the debug
Mirror's is good as people are likely to understand it.
I know its a radical jump is %MIRROR% needed, I always thought it was a bit of a waste of bytes having the URL at the front of each of the searches.
Just change home= & [mirrors] into [home], if there is only one home page just have one entry under [home]
it seems @url is a bit ambiguous why not @home
--- Code: ---[script]
name=PirateBay.se
source=PirateBay.se
author=chip
modified=Bovski(ASC) 2012/10/19
enabled=1
version=2
cookie=tpb=1;
[home]
1=http://thepiratebay.se
2=https://tpb.pirateparty.org.uk
[profiles]
all=/search/%SEARCH%/0/99/0
audio=/search/%SEARCH%/0/99/100
video=/search/%SEARCH%/0/99/200
apps=/search/%SEARCH%/0/99/300
games=/search/%SEARCH%/0/99/400
[code1]
x=findh(x,@data,`searchResult`,`</tr`,`>`,)
z=find(x,@data,`</table>`)
@data=crop(@data,x,z)
@data=vacuum(@data)
@data=replace(@data,`</TD>`,`<!--EOL--></TD>`)
@data=replace(@data,` TiB`,` TB<!--EOS-->`)
@data=replace(@data,` GiB`,` GB<!--EOS-->`)
@data=replace(@data,` MiB`,` MB<!--EOS-->`)
@data=replace(@data,` KiB`,` KB<!--EOS-->`)
@r=split(@data,`</tr>`)
start
@q=split(@r,`</td>`,2)
t=array(@q,1)
$page=extract(@i,t,`href="`,`"`,@home)
$name=extract(@i,t,`title="details for`,`"`)
$torrent=extract(@i,t,`href="`,`"`,@home)
k=find(1,$torrent,`magnet:?`)
if (k>0) then
$torrent=mid($torrent,k)
end if
@i=find(@i,t,`"detDesc">Uploaded`)
$size=extract(@i,t,`Size `,`<!--EOS-->`)
$seeds=array(@q,2)
$leeches=array(@q,3)
aloop
[/code1]
--- End code ---
chip!:
Oh yeah, prefect. That solves it :) thanks Bovski
And i will play with the update to [profiles] too because i like that its simpler.
chip!:
i've got those above changes made to the script engine.. i like it :)
thanks!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version