Author Topic: Pirate Party Proxy's  (Read 23903 times)

Offline Bovski

  • Head Cider Tester
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +189/-0
  • High Five Me
    • View Profile
    • Warez The Index
Pirate Party Proxy's
« on: October 13, 2012, 04:35:48 am »
As you may be aware TPB is being blocked in a lot of countries even my beloved England the nice people at the Pirate Party UK have provided a proxy so that everyone can carry on enjoying the TPB.

They are even good enough to provide it in a nice HTTPS form so it will only work on Bit Che 2.0 build 16 - beta or Newer thanks chip.

The piraten partij nl where nice enough to provide a proxy for KickAssTorrents (kat.ph.proxy.piratenpartij.nl)
« Last Edit: October 13, 2012, 05:19:09 am by Bovski »

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: Pirate Party Proxy's
« Reply #1 on: October 15, 2012, 03:11:12 pm »
awesome, thanks Bovski!  great to see you back :)

I will try to post the latest beta build soon that adds support for URL mirrors in the existing script, as example:

Code: [Select]
[script]
name=PirateBay.se
source=PirateBay.se
author=chip
modified=Bovski(ASC) 2011/05/29
notes=http://thepiratebay.se/s/?q=searchtest&searchTitle=on&page=0&orderby=99   *bug: sets a cookie but bit che needs to follow 302 redirect to search page.
enabled=1
home=http://thepiratebay.se/
version=2
cookie=tpb=1;

[mirrors]
index=1
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,`&nbsp;TiB`,` TB<!--EOS-->`)
@data=replace(@data,`&nbsp;GiB`,` GB<!--EOS-->`)
@data=replace(@data,`&nbsp;MiB`,` MB<!--EOS-->`)
@data=replace(@data,`&nbsp;KiB`,` KB<!--EOS-->`)
@r=split(@data,`</tr>`)

start
@q=split(@r,`</td>`,2)
t=array(@q,1)
$page=extract(@i,t,`href="`,`"`,`%MIRROR%`)
$name=extract(@i,t,`title="details for`,`"`)

$torrent=extract(@i,t,`href="`,`"`,`%MIRROR%`)
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]
  -  https://convivea.com  -   And...  boom goes the dynamite.

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: Pirate Party Proxy's
« Reply #2 on: October 16, 2012, 05:25:56 am »
In reviewing, I'm probably going to make a few changes to the mirror support implementation. I see a few things I can improve on (home page, mirror index survival after script update, script variable used).
  -  https://convivea.com  -   And...  boom goes the dynamite.

Offline Bovski

  • Head Cider Tester
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +189/-0
  • High Five Me
    • View Profile
    • Warez The Index
Re: Pirate Party Proxy's
« Reply #3 on: October 16, 2012, 07:33:14 am »
This is awesome.

is home= needed if there is a mirrors section

is mirrors the correct term as if the main site goes down so do the mirrors these are more like gateways or proxies

P.S.
is this forum limited access ? http://convivea.com/forums/index.php?topic=2138.msg19408#msg19408
« Last Edit: October 16, 2012, 07:35:00 am by Bovski »

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: Pirate Party Proxy's
« Reply #4 on: October 17, 2012, 02:38:34 pm »
yeah i guess this sub forum was... I created it hidden because I was testing out an idea for online storage of the scripts to be embedded in the forums here.

not sure if 'mirrors' is a bad name or not. i think its probably the most recognizable to the most amount of people though.

ok thanks, I guess 'home=' isnt needed if the script has a given 'mirror'... i'll make that change instead of adding another 'home' for a given 'mirror'.

and I think i'm going to leave '%MIRROR%' in the 'code'  of the script because its actually not a variable that can be used, like @data, but rather, its a pure string replacement of the script for the URL selected. reason for this is to allow the existing scripts to be minimally edited.  but, I am having second thoughts about having another 'special' exception to the script formats, so I might keep %MIRROR% in the script header, to match %SEARCH%, but then create another special true variable in the engine for @mirror.

hmmmmm....
  -  https://convivea.com  -   And...  boom goes the dynamite.

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: Pirate Party Proxy's
« Reply #5 on: October 17, 2012, 03:31:49 pm »
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: [Select]

[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,`&nbsp;TiB`,` TB<!--EOS-->`)
@data=replace(@data,`&nbsp;GiB`,` GB<!--EOS-->`)
@data=replace(@data,`&nbsp;MiB`,` MB<!--EOS-->`)
@data=replace(@data,`&nbsp;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]

« Last Edit: October 17, 2012, 05:24:28 pm by chip! »
  -  https://convivea.com  -   And...  boom goes the dynamite.

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: Pirate Party Proxy's
« Reply #6 on: October 17, 2012, 05:29:02 pm »
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
  -  https://convivea.com  -   And...  boom goes the dynamite.

Offline Bovski

  • Head Cider Tester
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +189/-0
  • High Five Me
    • View Profile
    • Warez The Index
Re: Pirate Party Proxy's
« Reply #7 on: October 18, 2012, 11:29:25 pm »
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: [Select]
[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,`&nbsp;TiB`,` TB<!--EOS-->`)
@data=replace(@data,`&nbsp;GiB`,` GB<!--EOS-->`)
@data=replace(@data,`&nbsp;MiB`,` MB<!--EOS-->`)
@data=replace(@data,`&nbsp;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]


« Last Edit: October 18, 2012, 11:45:54 pm by Bovski »

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: Pirate Party Proxy's
« Reply #8 on: October 19, 2012, 01:25:10 am »
Oh yeah, prefect. That solves it :) thanks Bovski

And i will play with the update to [profiles] too because i like that its simpler.
  -  https://convivea.com  -   And...  boom goes the dynamite.

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: Pirate Party Proxy's
« Reply #9 on: October 23, 2012, 08:37:03 am »
i've got those above changes made to the script engine.. i like it :)
thanks!
  -  https://convivea.com  -   And...  boom goes the dynamite.

Offline Bovski

  • Head Cider Tester
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +189/-0
  • High Five Me
    • View Profile
    • Warez The Index
Re: Pirate Party Proxy's
« Reply #10 on: October 23, 2012, 10:16:52 am »

Offline Bovski

  • Head Cider Tester
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +189/-0
  • High Five Me
    • View Profile
    • Warez The Index
Re: Pirate Party Proxy's
« Reply #11 on: December 27, 2012, 06:53:45 am »
You didn't mention there was a limit to the number of mirrors this code
Code: [Select]
[home]
1=http://thepiratebay.se
2=http://tpb.piraten.lu
3=https://tpb.partidopirata.com.ar
4=http://thepiratebay.se.proxy.piratenpartij.nl
5=https://tpb.ipredator.se
6=http://www.tpb.netii.net
7=http://labaia.ws
8=https://tpb.pirati.cz
9=http://piratebaysafe.me
10=http://piratebaymirror.me
11=http://www.dieroschtibay.org
12=http://tpb.pirates.ie
13=http://tpb.anonhi.de
14=http://piratebay.h4ck.la
15=http://pirate.wodan-heerst.nl
16=http://tpb.ezvpn.co.uk
17=http://tpb.dorbais.fr
18=http://tpb.zhuk.co.uk
19=http://tpb.noflag.org.uk
20=http://tpb.genyaa.org
21=http://piratebayunblocked.co
22=http://tpb.swedendedicated.com
23=http://tpb.dbpotato.net
24=http://29a.comuf.com/x
25=http://theponybay.org
26=http://hydra.beesybe.es
27=http://tweax.nl
28=http://tpb.occupyuk.co.uk
29=http://tpb.k0nsl.org
30=http://tpb.ninja.so
just makes the menu item disapear

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: Pirate Party Proxy's
« Reply #12 on: December 28, 2012, 02:28:37 am »
You didn't mention there was a limit to the number of mirrors this code
just makes the menu item disapear

your right, looks like i hard coded to stop looking at 10 mirrors. instead of making it load unlimited mirrors for the menu, i've increased this limit to 100.. but if it reaches the limit, it will not hide the menu (as it does currently).
  -  https://convivea.com  -   And...  boom goes the dynamite.

Offline Bovski

  • Head Cider Tester
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +189/-0
  • High Five Me
    • View Profile
    • Warez The Index
Re: Pirate Party Proxy's
« Reply #13 on: December 28, 2012, 10:36:01 am »
You didn't mention there was a limit to the number of mirrors this code
just makes the menu item disapear

your right, looks like i hard coded to stop looking at 10 mirrors. instead of making it load unlimited mirrors for the menu, i've increased this limit to 100.. but if it reaches the limit, it will not hide the menu (as it does currently).

LOL 100 should be enough. now all we need is bitche to update like the scripts I didn't like github to start with but if there is a problem its just so easy to fix a script and get it out.

There does seem to be a problem with bitche and unicode from github had that French script was working until I uploaded it to Git and it stopped working even though it looked fine on git it was messed up in the debugger.

The affected line
Code: [Select]
x=findh(x,@data,`Résultats de Recherche`,`</thead>`,`<tbody`,`>`,``)was easy to fix but just letting you know.

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: Pirate Party Proxy's
« Reply #14 on: December 28, 2012, 11:34:52 am »
There does seem to be a problem with bitche and unicode from github had that French script was working until I uploaded it to Git and it stopped working even though it looked fine on git it was messed up in the debugger.
The affected line
Code: [Select]
x=findh(x,@data,`Résultats de Recherche`,`</thead>`,`<tbody`,`>`,``)was easy to fix but just letting you know.

probably something we would have to keep our eye on with Github uploads because it appears the problem was that the file is converted to "UTF-8" when uploaded to github.   on your computer it must have been saved as "Unicode" file format because Bit Che can read both "ANSI" and "Unicode" file formats.. but apparently it cant read those saved with "UTF-8".. and doing a couple quick google searches, looks like there's no immediate simple solution for me..

so, i dont know if this is a problem with Github in general or only when using the new 'create file' feature (i suspect its only a problem using that new feature).

here's your original file that works with the character.  just to see if it was working, i modified it to not need a pwd so i could search without logging in.

note:   open any .ini file and go to File | Save As.. and on that dialog is where you get you pick and choose how the file is saved. by default, its "ANSI" unless you are saving other characters, then it defaults to "Unicode". 
  -  https://convivea.com  -   And...  boom goes the dynamite.