DIGIT-ARC read-only archive · snapshot: July 23, 2026

program for moving through numbered html pages

15 posts · originally from https://geek.digit.in/community/threads/program-for-moving-through-numbered-html-pages.155153/

doomgiver
doomgiver Original post #1
Apr 5, 2012 at 11:46 PM
i want to browse through a site which contains pages ordered in ascending secquence.

like :

/www.page.com/page/1
/www.page.com/page/2
/www.page.com/page/3
...
so on automatically, with a short, changable delay.

i think this can be done somehow in javascript/python, but i dont know how.
can someone help me here?
Liverpool_fan
Apr 6, 2012 at 12:21 AM
Moving through? You mean what? Indexing? Downloading? What?
krishnandu.sarkar
Apr 6, 2012 at 12:34 AM
By any chances you mean Navigation System like these threads have..??

First, Previous, 1, 2, 3, Next, Last
doomgiver
Apr 6, 2012 at 12:43 AM
yeah, something like KS said.

i just want to browse.

lots of image sites have their images indexed in folders. i want to navigate one by one (at keypress or at a pre-determined time) through them.
T
Apr 6, 2012 at 12:55 AM
PM me the site, I'll quickly build it for you!
Niilesh
Niilesh #6
Apr 6, 2012 at 3:02 AM
Does the site has some index kind of page?
If yes simply download level1 links. Though it will download more than needed
You can also download "/www.page.com/page/*" (if it only points to needed files)
nims11
nims11 #7
Apr 6, 2012 at 11:24 AM
easily through javascript.
doomgiver
Apr 6, 2012 at 12:13 PM
i donot need to download.
like im on /page/1
and press a key, then i get taken to /page/2 ... so on, like in online manga readers.

and yeah, the site is indexed.

"*tf2b.com/"
the numbers go into the field at top left.

example with number :
"*tf2b.com/?id=76561197990263447"

krish_puri made a spiffing good program, in a damn short time too!
it takes a starting id, 76561197990263447, in this case, number of attempts or range, and time to stay on the page.

it works great!!

it goes through each id, just as i wanted.
but its slightly slow to load the pages on ym system(old laptop) i think it uses chrome engine. if only it could be made to use the opera engine, it'd blaze through!!!

and a java script alternative, if its possible would be awesome too.
RCuber
RCuber #9
Apr 6, 2012 at 12:17 PM
you can use Opera's Forward button to go to next page.
doomgiver
doomgiver #10
Apr 6, 2012 at 12:35 PM
^^ does not work.
keep in mind that im not going back and forth in history, i want to go to the next backpack id.

in short, i want to view all backpacks one by one.
try these :
"*tf2b.com/?id=76561197990263447"
76561197990263448
76561197990263449
76561197990263450

this is what i meant by going thru backpacks one by one.
skeletor
skeletor #11
Apr 6, 2012 at 1:17 PM
lol tf2 backpack
doomgiver
doomgiver #12
Apr 6, 2012 at 1:29 PM
you know it, :)

anyway, the rest of the sites dont have what i want to do.
nbaztec
nbaztec #13
Apr 6, 2012 at 1:32 PM
Easy as a pie, but wait a caveat - If you visit that site you will not have any control on the JS. Enter <iframe />

Use this HTML:

Code:
<html>
     <head><title>Foo::Bar</title></head>
     <body>
    	<iframe id="preview" src="" width="800" height="600"></iframe>
       	<script type="text/javascript">
			var base_addr = "*tf2b.com/?id=";
			var num_str = "76561197990";
			var num_int = 263447;
			var increment = 1;
			var delay = 1000;
			var preview = document.getElementById("preview");
			setInterval(function(){		
				preview.src = base_addr + num_str + num_int;
				num_int += increment;
			},delay);
		</script>
    </body>
</html>

Change the code in vars accordingly:
base_addr : Site root address
num_str : In case the number is too big to JS split it in a static string part and integer part
num_int : The incremental part of number
increment: The increment factor
delay : Delay in milliseconds
doomgiver
doomgiver #14
Apr 6, 2012 at 2:03 PM
aww sweet!!!
just what i needed!!!

hmm, now it needs just one thing.
how to pause or stop it when i want?

i donot wish to kill the tab, i want to just pause it, or, better, have it output the id when i last pressed the stop button/keystroke.

ok, cool, i understand what you did with splitting the numbers into 2. that makes it pretty simple.
nbaztec
nbaztec #15
Apr 6, 2012 at 2:14 PM
Code:
<html>
	<head><title>Foo::Bar</title></head>
	<body>
    	<input name="button" id="control" type="button" value="Start" onClick="changeState()"><br>
<iframe id="preview" src="" width="800" height="600"></iframe>
       	<script type="text/javascript">
			var base_addr = "*tf2b.com/?id=";
			var num_str = "76561197990";
			var num_int = 263447;
			var increment = 1;
			var delay = 1000;
			
			var state = false;
			var preview = document.getElementById("preview");
			var id = 0;
			function changeState(){
				state = !state;
				if(state){ doJob(); document.getElementById("control").value = "Stop"; }
				else if(id){ clearInterval(id);	document.getElementById("control").value = "Start"; }			
			}
			function doJob(){
					id = setInterval(function(){		
					preview.src = base_addr + num_str + num_int;
					num_int += increment;
				},delay);
			}
	 </script>
    </body>
</html>

More features?

Code:
<html>
	<head><title>Foo::Bar</title></head>
	<body>
    	<input name="button" id="control" type="button" value="Start" onClick="changeState()">
        <div>Current page: <span id="output" style="color:#039"></span></div><br>
<iframe id="preview" src="" width="800" height="600"></iframe>
       	<script type="text/javascript">
			var base_addr = "*tf2b.com/?id=";
			var num_str = "76561197990";
			var num_int = 263447;
			var increment = 1;
			var delay = 2000;
			
			var state = false;
			var preview = document.getElementById("preview");
			var output = document.getElementById("output");
			var control = document.getElementById("control");			
			var id = 0;
			function changeState(){
				state = !state;
				if(state){ doJob(); control.value = "Stop"; }
				else if(id){ clearInterval(id);	control.value = "Start"; }			
			}
			function doJob(){
					id = setInterval(function(){		
					output.innerText = preview.src = base_addr + num_str + num_int;
					num_int += increment;
				},delay);
			}
		</script>
    </body>
</html>