Bit Che > Scripts & Development

multi-page support

<< < (3/4) > >>

CuF:
Cool.  Looking forward to figuring this out.
I think I tried multipaging once before and failed then too.

chip!:
okee dokey.. grab the latest from here: http://convivea.com/forums/index.php/topic,2415.msg21136.html#msg21136

in the debugger you will notice at the bottom of the window, details on morepage to help with multi-page stuff.

for the html, you can use @data=utf8decode(@data) if the source HTML page in UTF-8 character set and you have issues viewing certain characters.

let me know what you think?

CuF:
Nice to have that info in the debugger.  I see:

--- Code: ---MorePages:
Find: >Next →</a>
Result: Found
Current Counter: 0
Current Page: http://btdigg.org/search?info_hash=&order=0&q=cow&p=0
Next Counter: 1
Next Page: http://btdigg.org/search?info_hash=&order=0&q=cow&p=1
--- End code ---

But after the first 10 in the @r Bit Che still stops.  I must be missing something.

2 other thoughts that are a bit off topic.
The latest version of BC, 3.5 build 8, has a weird bug that if you click away from the Debugger and then click in it to bring it to the front if flickers like mad.

Also, BTDigg uses Magnet links.  Do I have to use:

--- Code: ---$seeds=put(1)
$leeches=put(1)
--- End code ---
...or is it possible to get the real numbers?

chip!:

--- Quote from: CuF on January 06, 2015, 08:06:53 am ---Nice to have that info in the debugger.  I see:

--- Code: ---MorePages:
Find: >Next →</a>
Result: Found
Current Counter: 0
Current Page: http://btdigg.org/search?info_hash=&order=0&q=cow&p=0
Next Counter: 1
Next Page: http://btdigg.org/search?info_hash=&order=0&q=cow&p=1
--- End code ---

But after the first 10 in the @r Bit Che still stops.  I must be missing something.

2 other thoughts that are a bit off topic.
The latest version of BC, 3.5 build 8, has a weird bug that if you click away from the Debugger and then click in it to bring it to the front if flickers like mad.

Also, BTDigg uses Magnet links.  Do I have to use:

--- Code: ---$seeds=put(1)
$leeches=put(1)
--- End code ---
...or is it possible to get the real numbers?

--- End quote ---

So in the debugger, on the first http page request, there are only 10 results given, so @r only has 10 items..  Bit che finishes the script for that http request. Then it checks for that more pages string, if found, generates the URL for the next HTTP request.. Fetches the next pages, and then restarts the script.. So if you press the 'run' button, it should go fetch the next page and then pause in the debugger at the start of the script of the 2nd page (2nd set of 10 items would then go to @r again..).   Not sure if that helps?? Or.. Are you saying it never fetches the 2nd page at all even though the debugger says 'found' for the more pages?


And I'll look into that flicker bug, I can reproduce it so I should be able to fix it.


And for magnets, they don't contain seeds/leeches.. Those can only be obtained by the torrent downloader once it connects to the tracker and gets an update (bit che can do that on the Torrent Details dialog using the Scrape button.. But it would not make sense to have the script launch Scrape requests for each result it finds when in a search).








CuF:
After the 10th @r, even though MorePages says:

--- Code: ---MorePages:
Find: >Next →</a>
Result: Found
Current Counter: 0
Current Page: http://btdigg.org/search?info_hash=&order=0&q=test&p=0
Next Counter: 1
Next Page: http://btdigg.org/search?info_hash=&order=0&q=test&p=1
--- End code ---
All debugger buttons deactivate/turn grey.

Similarly, without the debugger only 10 results are found.

As far as the Magnet links, I understand about scraping them.  I was mostly checking to make sure setting the seeders/leechers to 1 was the preferred scripting for that.  I thought maybe BC recognized a link as Magnet and automatically did something with the seeds/leeches so put(1) isn't necessary.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version