Trying to make a spider using mechanize

tedpottel at tedpottel at
Mon Sep 8 18:24:17 CEST 2008


I can read the home page using the mechanize lib.  Is there a way to
load in web pages using filename.html instad of servername/
filename.html.  Lots of time the links just have the file name.  I'm
trying to read in the links name and then vsit those pages.

here is the sample code I am ussing.

import ClientForm
import mechanize

#get home page
request = mechanize.Request("")
response = mechanize.urlopen(request)

#sub page (this does note work)
request = mechanize.Request("service.html")
response = mechanize.urlopen(request)

More information about the Python-list mailing list