Bit Che > Scripts & Development

Trying to write v2 script for BakaBT

(1/2) > >>

CuF:
I have no idea what is up with this one.
It looks simple, but neither a standard login nor special login works when you try to search.
It says 'Advanced browsing is not available for non-members.'

Is this a BakaBT crazy thing or an incompatibility with BC v2?

chip!:
not sure really.. but attached here I have started the script, and it seems to login and search (i did not work on any of the result parsing code... everything there can be deleted)

let me know if that helps?

CuF:
Thanks.  Looks like it was sensitive to my using www. when I didn't need to.

CuF:
One more thing.  This is still one of those sites where the download link isn't in the search results.

The old trick was something like:
k=p(http://btjunkie.org/auto_download?do=download&id=)
7=save(k)

Is there a way to do that in v2?

Bovski:
Well there is a [code2] section in v2 so the second page can be downloaded to grab the link.

--- Code: ---[script]
name=bakabt.me
source=bakabt.me
author=chip
modified=Bovski 2013/01/12
pwd=1
version=2

[home]
1=http://bakabt.me

[profiles]
all=/browse.php?only=0&incomplete=1&lossless=1&hd=1&multiaudio=1&bonus=1&reorder=1&q=%SEARCH%

[login]
login=http://bakabt.me/login.php
form=username=%USER%&password=%PASS%
failed=<form method="post" action="login.php">
failed2=/login.php?return

[code1]
x=findh(@i,@data,`<div class="pager">`,`</tr></thead><tbody`,`>`,)
z=find(x,@data,`</tbody></table></div>`)
@data=crop(@data,x,z)
@data=vacuum(@data)
@data=replace(@data,`'`,``)
@data=replace(@data,`&amp;`,`&`)
@data=replace(@data,`<strong>`,``)
@r=split(@data,`</tr>`)

start
@q=split(@r,`</td>`,2)
t=array(q,1)
x=find(@i,t,`href=`)
$page=extract(x,t,`"`,`"`,@home)
$name=extract(x,t,`title="`,`"`)
$torrent=code($page,2)
$date=array(q,3)
$size=array(q,4)
t=array(q,5)
y=find(@i,t,`</a>`)
x=findrev(y,t,`>`)
$seeds=extract(x,t,`>`,`</a>`)
y=+(3)
y=find(y,t,`</a>`)
x=findrev(y,t,`>`)
$leeches=extract(x,t,`>`,`</a>`)
aloop
[/code1]

[code2]
x=find(@i,@data,`download_link`,`href=`)
$torrent=extract(x,@data,`"`,`"`,@home)
[/code2]

--- End code ---

This is done when you attempt to download the torrent

--- Code: ---$torrent=code($page,2)
--- End code ---
$page is downloaded and stored in @data then the [code2][/code2] section is run to generate the $torrent link

Navigation

[0] Message Index

[#] Next page

Go to full version