[Tutor] How to grab a part of web page?

SA sarmstrong13@mac.com
Tue, 09 Jul 2002 16:16:51 -0500


On 7/9/02 3:47 PM, "A" <printers@sendme.cz> wrote:

> Hi,
> Is it possible to download only a part of web page?
> Say I need to find out an information about a customer that starts
> at 1500 byte position and ends at 2000 byte position. If the whole
> page has about 100 kb it seems to me waste of time to load all the
> page.
> What is the best, yet easy, solution?
> Is it possible to use httplib or necessary socket module?
> Thank you for help.
> Ladislav


You could use the re module to search for  specific tags and then download
from there. Ther is a program called spyder.py out there that could give you
some ideas on how to write this program. It is used in Plucker to download
specific items from a website and then convert them into a portable document
format that can be read on a pda using their plucker software. The program
is open source and written entirely in python I believe. So read some of
their scripts to give you an idea how to accomplish this.

Hope this helps.
SA