Webchecker Usage - a problem with local usage

C

Colin J. Williams

I have material on a local PC which I upload to a web server.

I would like to use webchecker to check both the local linkage and that
at the remote server.

All works well when I check the remote server: http://www3.sympatico.
.... The URL for the index.html.

However, only the index.html is read when using: file:C:\\Python23/
.... The URL for the index.html.

The problem arises in the Checker method, where the basic structure of
the url has been changed. It no longer contains the root:

def inroots(self, url):
for root in self.roots:
if url[:len(root)] == root:
return self.isallowed(root, url)
return 0

It appears to be caused at urlparse lines 129 and 130, where three '/'
characters are prepended to the URL.

By commenting out lines 128, 128 and 130 of urlparse, I get the same
report for the local files that I get from the web server.

I don't like modifying a library routine, even a local copy and would
appreciate advice.

Thanks.

Colin W.
 
C

Colin J. Williams

Colin said:
I have material on a local PC which I upload to a web server.

I would like to use webchecker to check both the local linkage and that
at the remote server.

All works well when I check the remote server: http://www3.sympatico.
.... The URL for the index.html.

However, only the index.html is read when using: file:C:\\Python23/
.... The URL for the index.html.

The problem arises in the Checker method, where the basic structure of
the url has been changed. It no longer contains the root:

def inroots(self, url):
for root in self.roots:
if url[:len(root)] == root:
return self.isallowed(root, url)
return 0

It appears to be caused at urlparse lines 129 and 130, where three '/'
characters are prepended to the URL.

By commenting out lines 128, 128 and 130 of urlparse, I get the same
report for the local files that I get from the web server.

I don't like modifying a library routine, even a local copy and would
appreciate advice.

Thanks.

Colin W.
Unfortunately, the change to urlparse has an unintended side-effect.

It prevents the check of any external links from the local machine.

Colin W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top