Friday, July 15, 2005

Sucking Down TGPs With URLToys

Update: URLs changed to protect the innocent.

First of all, some of you may be wondering what TGP stands for. Well, it's an acronym for "Thumbnail Gallery Post," or in other words, it's those galleries smattered all over the web with 15 or so pics and a hell of a lot of ads. Webmasters use special scripts and programs to generate these galleries en-masse, so there's a lot of them. Sites like Thumbzilla and The Hun's Yellow Pages link to the hundreds of TGP galleries that crop up every day. If you want to learn more about TGPs then check-out this Wikipedia entry on them.

Good ol' URLToys can act as a pseudo-browser and navigate TGP galleries for you. You can get straight to the images in the TGP gallery via the process of parsing the TGP URL and then pruning the download queue that URLToys creates.

Let's get started!

First, boot up URLToys. If you don't have it yet, I suggest you check-out our intro to URLToys we wrote yesterday.

Once you're in, enter in the URL you want to download from prefixed by the "add" command:

URLToys (0)> add http://www.billionsofpics.com/free/blonde-teen/series1.htm

This adds that single URL to URLToys' queue.

The next thing we want to do is have URLToys search the page you just added for everything it links to. One way of doing this is via the "make" command. Note that after I run the command how the number next to the URLToys prompt increases. That number is the number of items in the URLToys download list.

URLToys (1)> make
Searching (1/1) "add http://www.billionsofpics.com/free/blonde-teen/series1.htm"...18 found.
URLToys (18)>


Using "list" we can see the URLToys has found all of the images that the thumbnails on the page links to as well as some other garbage we don't want:

URLToys (18)> list
http://www.billionsofpics.com/free/blonde-teen/01.jpg
http://www.billionsofpics.com/free/blonde-teen/02.jpg
http://www.billionsofpics.com/free/blonde-teen/03.jpg
http://www.billionsofpics.com/free/blonde-teen/04.jpg
http://www.billionsofpics.com/free/blonde-teen/05.jpg
http://www.billionsofpics.com/free/blonde-teen/06.jpg
http://www.billionsofpics.com/free/blonde-teen/07.jpg
http://www.billionsofpics.com/free/blonde-teen/08.jpg
http://www.billionsofpics.com/free/blonde-teen/09.jpg
http://refer.payforporn.com/cgi-bin/clicks.cgi?CA=924891&PA=966515&HTML=http://www.bigtimepornsite.com/
http://www.billionsofpics.com/free/blonde-teen/10.jpg
http://www.billionsofpics.com/free/blonde-teen/11.jpg
http://www.billionsofpics.com/free/blonde-teen/12.jpg
http://www.billionsofpics.com/free/blonde-teen/13.jpg
http://www.billionsofpics.com/free/blonde-teen/14.jpg
http://www.billionsofpics.com/free/blonde-teen/15.jpg
http://refer.payforporn.com/cgi-bin/clicks.cgi?CA=924891&PA=966515&HTML=http://www.bigtimepornsite.com/
URLToys (18)>


There are a couple of ways we can now prune this list to only be the jpg images. The best way to suit our purposes for now is by using the "keep" command, which tells URLToys to get rid of all the URLs that don't contain what you specify, which in this case is "jpg".

URLToys (18)> keep jpg
URLToys (15)>


Note the number of items in the queue is now just 15. If we type "list" we should just see image links. Note that if you made a mistake, you can type "undo" to undo your last command.

URLToys (15)> list
http://www.billionsofpics.com/free/blonde-teen/01.jpg
http://www.billionsofpics.com/free/blonde-teen/02.jpg
http://www.billionsofpics.com/free/blonde-teen/03.jpg
http://www.billionsofpics.com/free/blonde-teen/04.jpg
http://www.billionsofpics.com/free/blonde-teen/05.jpg
http://www.billionsofpics.com/free/blonde-teen/06.jpg
http://www.billionsofpics.com/free/blonde-teen/07.jpg
http://www.billionsofpics.com/free/blonde-teen/08.jpg
http://www.billionsofpics.com/free/blonde-teen/09.jpg
http://www.billionsofpics.com/free/blonde-teen/10.jpg
http://www.billionsofpics.com/free/blonde-teen/11.jpg
http://www.billionsofpics.com/free/blonde-teen/12.jpg
http://www.billionsofpics.com/free/blonde-teen/13.jpg
http://www.billionsofpics.com/free/blonde-teen/14.jpg
http://www.billionsofpics.com/free/blonde-teen/15.jpg
URLToys (15)>


Yep, there they are! Now just type "get" to begin downloading!

URLToys (15)> get
Downloading "http://ww.billionsofpics.com/free/blonde-teen/01.jpg"...
[*************************] [ 93905b of 93905b | 1/15 (to 00000) ]
Downloading "http://ww.billionsofpics.com/free/blonde-teen/02.jpg"...
[*************************] [ 84799b of 84799b | 2/15 (to 00000) ]
Downloading "http://ww.billionsofpics.com/free/blonde-teen/03.jpg"...
[*************************] [ 82311b of 82311b | 3/15 (to 00000) ]
Downloading "http://ww.billionsofpics.com/free/blonde-teen/04.jpg"...
[*************************] [ 85880b of 85880b | 4/15 (to 00000) ]


Enjoy!

No comments:

Post a Comment