Author Topic: Elbitz.com - WORK IN PROGRESS  (Read 15322 times)

LordGnat

  • Guest
Elbitz.com - WORK IN PROGRESS
« on: April 06, 2008, 02:06:51 pm »
Work in progress.

Code: [Select]
[script]
name=Elbitz.net
home=http://elbitz.net
pwd=1
login=http://elbitz.net/takelogin.php
form=username=%USER%&password=%PASS%
failed=<form method="post" action="takelogin.php">
failed2=/login.php?returnto=
prelogin=http://elbitz.net/login.php
referer=http://elbitz.net/login.php

main=http://elbitz.net/browse.php?search=%SEARCH%&cat=0
audio=http://elbitz.net/browse.php?search=%SEARCH%&cat=6
video=http://elbitz.net/browse.php?search=%SEARCH%&cat=12

[ code]

x=h(x,d,Uploader</a></td>)
x=+(26)
y=i(x,d,</table>)
d=c(d,x,y)

r=split(d,<tr>)
i=p(1)

start

q=split(r,</td>)
k=array(q,1)
x=i(i,k,<b>)
y=i(i,k,</b>)
x=+(3)
k=c(k,x,y)
1=save(k)

k=array(q,1)
x=r(-1,k,http)
y=i(x,k,><)
y=-(1)
k=c(k,x,y)
7=save(k)

k=array(q,1)
x=i(i,k,href)
x=+(6)
y=i(x,k,><)
y=-(1)
k=c(k,x,y)
3=save(k)

k=array(q,5)
y=r(-1,k,<br>)
x=i(i,k,0px'>)
x=+(5)
k=c(k,x,y)
k=replace(k,&nbsp;, )
2=save(k)

k=array(q,6)
y=r(-1,k,</font>)
x=i(i,k,00>)
x=+(3)
k=c(k,x,y)
5=save(k)

k=array(q,7)
k=replace(k,</b>,)
k=replace(k,center">,|)
k=replace(k,todlers=1>,|)
y=r(-1,k,)
x=r(-1,k,|)
x=+(1)
y=+(1)
k=c(k,x,y)
6=save(k)

aloop

[ /code]

   1 = name
   2 = size
   3 = source page
   5 = seeds
   6 = leeches
   7 = .torrent url


[Edit] Scripts code tags have been changed to [ code] and [ /code] so as not to interfere with the boards code tags parsing[/Edit]
« Last Edit: April 06, 2008, 11:00:27 pm by Bovski »

Offline Bovski

  • Head Cider Tester
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +189/-0
  • High Five Me
    • View Profile
    • Warez The Index
Re: Elbitz.com - WORK IN PROGRESS
« Reply #1 on: April 07, 2008, 06:24:42 am »
First things first this one wasn't so easy as the start & split ponts arn't that obvious & they are the most important part of any script.
The language for scripting is Odd but once you have start to understand it you will see why as its coded for the job at hand and works really well

First off you missed out the author tag from the header  ;)
Code: [Select]
author=LordGnat

you used as your starting point
Code: [Select]
x=h(x,d,Uploader</a></td>)

It would have been better to used. yes I know it cuts into the resaults line but its a part that isnt used for our perposes.
Code: [Select]
x=h(x,d,Uploader,</TR>,http://elbitz.net/browse.php?cat=)

You used the wrong the split point for d.
Code: [Select]
r=split(d,<tr>)
why is this wrong ? well Not all the lines begin(End) with <tr> some use <tr class=highlight>

You could have used.
Code: [Select]
r=split(d,http://elbitz.net/browse.php?cat=)


Other problems

You  use
Code: [Select]
i=p(1)

There is an undocumented Feature When you use the array( function it sets z=1 thats why most scripts use z for this.
Im not sure using k for this
Code: [Select]
k=c(k,x,y)
1=save(k)
was the best use of that variable as it already had the line stored that you wanted to use later
Using
Code: [Select]
n=c(k,x,y)
1=save(n)
would have done the same without having to relaoad k with k=array(q,1)

You should realy think of using x and e functions and look at the source there was a title in it that was there begging to be used

Code: [Select]
k=array(q,1)
x=i(i,k,<b>)
y=i(i,k,</b>)
x=+(3)
k=c(k,x,y)
1=save(k)

Becomes
Code: [Select]
t=array(q,1)
z=i(z,t,title)
1=x(t,z,",")

t still contains array(q,1) so it doesn't have to be re set
z now = 64 as x(t,z,",") sets z to the position after the end of the second delimiter. this allows for a nice flow form begining to the end  of of the line.
so there is no need to start from scratch again

For testing my search tearm was "train" without the quotes.

My t=array(q,1) was
Code: [Select]
<td align=left><a title="Train Signal Windows 2008 Essentials " href="http://elbitz.net/details.php?id=16854&hit=1">Train Signal Windows 2008 Essentials</b></a> <br>2008-03-17&nbsp;00:15:21 <a class="index" href="http://elbitz.net/addmark.php?torrentid=16854">    [</b><font color=red>BookMark</font>]</b></a></div><td align="center"><a class="index" href="http://elbitz.net/download.php?id=16854&name=TS_Win2008.iso.torrent"><img src=./pic/dl.gif border=0 alt=Download></a><-EOL->

Starting from the begining of the line and work your way through its usable parts
Code: [Select]
t=array(q,1)
z=i(z,t,title)
1=x(t,z,",")
Get the line into t as we have used array( then z=1
the first part we are interested in is the title(it holds the name of the item) so lets find that so z=i(z,t,title)
z is now 20 the bit we wang is between the next pair of double quotes so we use 1=x(t,z,",") this stores the torrent name

Code: [Select]
z=i(z,t,href)
3=x(t,z,",")
z is now 64 (the position after the second quote) the next bit in this line that we want is the details link so we can use z=i(z,t,href) to find the next href then grab the text between the quotes after it with 3=x(t,z,",")

Code: [Select]
z=i(z,t,href,href)
7=x(t,z,",")
z is now 116 and the only bit left in this line we need is the torrent download link that isn't the next href but the one after so we use z=i(z,t,href,href) to find the second href
z is now 353 and all thats left to do is grab the data between the quotes so 7=x(t,z,",")


My t=array(q,5) was
Code: [Select]
<td align=center width=100 style='padding: 0px'>817.09&nbsp;MB<br><a href=http://elbitz.net/viewsnatches.php?id=16854>405 x </b>time</a><-EOL->

Code: [Select]
t=array(q,5)
2=x(t,z,>,<)
The next bit we need is on line 5 lets grab it with t=array(q,5)  as the bit we want is between the first > and the first < after that we can just use 2=x(t,z,>,<)
Bit che is smart enough to figure out that &nbsp; is a space.

Thats the simple stuff out of the way now its time to cheet

My t=array(q,6) (seeders) was
Code: [Select]
<td align=center><b><a href=http://elbitz.net/details.php?id=16854&hit=1&toseeders=1><font color=#000000>78</font></a></b><-EOL->

Code: [Select]
t=array(q,6)
z=i(z,t,>,>,>,)
5=x(t,z,>,<)
Its quite different if there isn't any seeders but will get back to that later basicaly all I did was step past the unwanted > with z=i(z,t,>,>,>,) then as usual I grabbed the bit I wanted 5=x(t,z,>,<)
Now the cheet if there are no seeders there is no <font>, < b>, or <a> this means the above code will return nothing to 5= this is realy handy as thats jus what we need there.

Code: [Select]
t=array(q,7)
z=i(z,t,>,>,)
6=x(t,z,>,<)
Just repeat as for leechers :)

The Final script should look something like this
Code: [Select]
[script]
name=elbitz.net
home=http://elbitz.net/
author=Bovski
pwd=1
login=http://elbitz.net/takelogin.php
form=username=%USER%&password=%PASS%&logintype=no
failed=<form method="post" action="takelogin.php">
failed2=/login.php?return
main=http://elbitz.net/browse.php?search=%SEARCH%&cat=0
audio=http://elbitz.net/browse.php?search=%SEARCH%&cat=6

[ code]
d=vacume(d)
x=h(x,d,Uploader,</TR>,http://elbitz.net/browse.php?cat=)
z=i(x,d,/TABLE)
d=c(d,x,z)
d=replace(d,</TD>,<-EOL-></TD>)
r=split(d,http://elbitz.net/browse.php?cat=)
start
q=split(r,</TD>,3)
t=array(q,1)
z=i(z,t,title)
1=x(t,z,",")
z=i(z,t,href)
3=x(t,z,",",http://elbitz.net/)
z=i(z,t,href,href)
7=x(t,z,",")
t=array(q,5)
2=x(t,z,>,<)
t=array(q,6)
z=i(z,t,>,>,>,)
5=x(t,z,>,<)
t=array(q,7)
z=i(z,t,>,>,)
6=x(t,z,>,<)
aloop
[ /code]
« Last Edit: April 07, 2008, 06:29:16 am by Bovski »