RefreshCapcha

Author Topic: The site I'm trying to learn to create a script  (Read 8982 times)

Dudeman456

  • Guest
The site I'm trying to learn to create a script
« on: July 23, 2007, 03:55:05 pm »
The site I'm trying to learn to create a script with shoots out result in the fashion below:

</tr>
<tr style="background:#E9F7CD;">
<td align=center style='padding: 0px'><a href="?cat=7"><img border="0" src="http://samplesite.com/pic/cats/tv720p_ny.png" alt="TV/720p" />[/url]</td>
<td align=left style='border-left: 0px;'><a href="details.php?id=1551&amp;hit=1"><font color=#FF0000>Weeds</font>.S02E11.720p.BluRay.x264-hV[/url]

<font color=gray size=1>11h, 53min, 49sec after pre</font>
</td>
<td align="center"><a href=download?id=1551><img src=http://samplesite.com/pic/download_t.gif border=0 title='Ladda ner'>[/url]</td>
<td align="right"><a href="details.php?id=1551&amp;hit=1&amp;filelist=1">27[/url]</td>
<td align="right">0</td>
<td align=center>1.12 GiB</td>

<td align=center class=added>2007-07-23
00:37:24</td>
<td align=center>4 times</td>
<td align=right><a href=details.php?id=1551&amp;hit=1&amp;toseeders=1><font color=#000000>3</font>[/url]</td>
<td align=right><a href=details.php?id=1551&amp;hit=1&amp;todlers=1>1</td>
<td align=center>Anonymous</td>
</tr>

with the torrent name located at:
<td align=left style='border-left: 0px;'><a href="details.php?id=1551&amp;hit=1"><font color=#FF0000>Weeds</font>.S02E11.720p.BluRay.x264-hV[/url]


Size located at:
<td align=center>1.12 GiB</td>

seeders at:
<td align=right><a href=details.php?id=1551&amp;hit=1&amp;toseeders=1><font color=#000000>3</font>[/url]</td>

leechers at:
<td align=right><a href=details.php?id=1551&amp;hit=1&amp;todlers=1>1</td>


How do I parse this information?

The results page is fill with alot of javascript calls.
« Last Edit: July 24, 2007, 12:10:53 pm by Bovski »

Offline Bovski

  • Head Cider Tester
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +189/-0
  • High Five Me
    • View Profile
    • Warez The Index
Re: The site I'm trying to learn to create a script
« Reply #1 on: July 24, 2007, 12:43:22 pm »
Ignore the java it's not of any interest

Basically the results will be in a repeating pattern ie
Code: [Select]
<tr style="background:#E9F7CD;">
<td align=center style='padding: 0px'><a href="?cat=7"><img border="0" src="http://samplesite.com/pic/cats/tv720p_ny.png" alt="TV/720p" />[/url]</td>
<td align=left style='border-left: 0px;'><a href="details.php?id=1549&amp;hit=1"><font color=#FF0000>Weeds</font>.S02E09.720p.BluRay.x264-hV[/url]

<font color=gray size=1>11h, 53min, 49sec after pre</font>
</td>
<td align="center"><a href=download?id=1549>[/url]</td>
<td align="right"><a href="details.php?id=1549&amp;hit=1&amp;filelist=1">27[/url]</td>
<td align="right">0</td>
<td align=center>1.12 GiB</td>

<td align=center class=added>2007-07-23
00:37:24</td>
<td align=center>4 times</td>
<td align=right><a href=details.php?id=1549&amp;hit=1&amp;toseeders=1><font color=#000000>3</font>[/url]</td>
<td align=right><a href=details.php?id=1549&amp;hit=1&amp;todlers=1>1</td>
<td align=center>Anonymous</td>
</tr>
<tr style="background:#E9F7CD;">
<td align=center style='padding: 0px'><a href="?cat=7"><img border="0" src="http://samplesite.com/pic/cats/tv720p_ny.png" alt="TV/720p" />[/url]</td>
<td align=left style='border-left: 0px;'><a href="details.php?id=1550&amp;hit=1"><font color=#FF0000>Weeds</font>.S02E10.720p.BluRay.x264-hV[/url]

<font color=gray size=1>11h, 53min, 49sec after pre</font>
</td>
<td align="center"><a href=download?id=1550>[/url]</td>
<td align="right"><a href="details.php?id=1550&amp;hit=1&amp;filelist=1">27[/url]</td>
<td align="right">0</td>
<td align=center>1.12 GiB</td>

<td align=center class=added>2007-07-23
00:37:24</td>
<td align=center>4 times</td>
<td align=right><a href=details.php?id=1550&amp;hit=1&amp;toseeders=1><font color=#000000>3</font>[/url]</td>
<td align=right><a href=details.php?id=1550&amp;hit=1&amp;todlers=1>1</td>
<td align=center>Anonymous</td>
</tr>
<tr style="background:#E9F7CD;">
<td align=center style='padding: 0px'><a href="?cat=7"><img border="0" src="http://samplesite.com/pic/cats/tv720p_ny.png" alt="TV/720p" />[/url]</td>
<td align=left style='border-left: 0px;'><a href="details.php?id=1551&amp;hit=1"><font color=#FF0000>Weeds</font>.S02E11.720p.BluRay.x264-hV[/url]

<font color=gray size=1>11h, 53min, 49sec after pre</font>
</td>
<td align="center"><a href=download?id=1551>[/url]</td>
<td align="right"><a href="details.php?id=1551&amp;hit=1&amp;filelist=1">27[/url]</td>
<td align="right">0</td>
<td align=center>1.12 GiB</td>

<td align=center class=added>2007-07-23
00:37:24</td>
<td align=center>4 times</td>
<td align=right><a href=details.php?id=1551&amp;hit=1&amp;toseeders=1><font color=#000000>7</font>[/url]</td>
<td align=right><a href=details.php?id=1551&amp;hit=1&amp;todlers=1>5</td>
<td align=center>Anonymous</td>
</tr>

Find the start and end of this block as you have just shown the block and not the page i cant help with this bit but it should be stored in d

then you need to split d into the individual results thats easy in this case
d=replace(d,</td>,[-bc-]</td>)
r=split(d,</tr>)
then the main code loop

start

Then Split the results into items with q=split(r,</td>,3)

and parse out the results, as you have a download link you shouldn't have any problems

If you have got this far you should have an array displayed in the debug window something like
Code: [Select]
-----------------INFO ARRAY: VARIABLE 'q'----------------
q Array: 13 items)

q(0):
/tr><tr>
<td align=center style='padding: 0px'><a href="http://samplesite.com/browse.php?cat=24"><img border="0" src="pic/episodes1.gif" alt="TV-XVID" /></a>[-bc-]

q(1):

<td align=left><a href="details.php?id=17067&amp;hit=1" title=Criss.Angel.Mindfreak.S03E09.DSR.XviD-CRiMSON><b>Criss.Angel.Mindfreak.S03E09.DSR.XviD-...</b></a>
[-bc-]

q(2):
<td>Uploaded 26 secs after pre.
<td align=center><a href=viewnfo.php?id=17067><img src=pic/viewnfo.gif border=0 alt='View NFO'><a href="download.php/17067/Criss.Angel.Mindfreak.S03E09.DSR.XviD-CRiMSON.torrent"><img src=pic/bookmark.gif border=0 alt=Download></a>[-bc-]

q(3):

[-bc-]

q(4):

<td align="right"><b><a href="details.php?id=17067&amp;hit=1&amp;filelist=1">16</a></b>[-bc-]

q(5):

<td align="right">0[-bc-]

q(6):

<td align=center><nobr>2007-07-25<br />02:42:31</nobr>[-bc-]

q(7):

<td align=center>178.17[-bc-]

q(8):
<td>MB[-bc-]

q(9):

<td align=center>0[-bc-]

q(10):
<td>times[-bc-]

q(11):

<td align=right><b><a href=details.php?id=17067&amp;hit=1&amp;toseeders=1>1</font></a></b>[-bc-]

q(12):

<td align=right><b><a href=details.php?id=17067&amp;hit=1&amp;todlers=1>2</b>[-bc-]


if ya post that it should be easy to go through it

P.S.
I'm surprised your so secretive about the site with times 11h, 53min, 49sec after pre it's really nothing impressive
BTW the L8test weeds is Weeds.S03E03.PREAIR.DVDRip.XviD-SiTV it Pre'd about 2½ hours ago
« Last Edit: July 24, 2007, 01:22:11 pm by Bovski »