This relates to a post from last year before I was subscribed.
I don't know whether it has been resolved.
A couple of notes: logging in via a form requires the twill library to be
installed. The error is coming from LinkChecker trying to do "simple" http
authentication. I agree that the documentation could be better but based
on config0.ini I can see what you're missing: you must have values in the
entry key and the loginurl for LinkChecker to try and use the form.
entry = http://lab-dashboard.bitgravity.com myusername it's_a_secret #
loginurl = http://lab-dashboard.bitgravity.com/login.php # change
loginuserfield = name_of_the_username_field
loginuserpasswordfield = name_of_the_password_field
Note, I haven't cracked this myself currently stuck with an Exception from
Twill twill.errors.TwillAssertionError: no matching forms!
@ Bastian: the docs for entry imply that you can have multiple logins but
this is only true for http authentication and not form-based, correct?
My site has the first page as a login, In order to check the links I need
to hit the first page and login. Ideally, I'd like to pass the user
password info in either through a cookie or through the linkcheckerrc so
that I don't have to manually enter the password in everytime.
I can't figure out how to do this. The examples aren't clear enough. I've
struggled with this for an hour. Unfortunately, my python isn't strong
enough for me to figure out how the code is parsing the conf file.
Here's what I'm executing
https://<url> --config=linkcheckerrc --output=html --cookiefile=cookie -C>
Here's the contents of cookie
Here's what's in linkcheckerrc
# Different user/password pairs for different URLs can be provided.
# Entries are a triple (URL regular expression, username, password),
# separated by whitespace.
# If the regular expression matches, the given user/password pair is used
# for authentication. The commandline options -u,-p match every link
# and therefore override the entries given here. The first match wins.
# At the moment, authentication is used for http[s] and ftp links.
# Note that passwords are optional. If any passwords are stored here,
# this file should not readable by other users.
# ^https?://www\.example\.com/~calvin/ calvin mypass
# ^ftp://www\.example\.com/secret/ calvin
# if the website requires a login the URL and optionally the user and
# password CGI fieldnames can be provided.
loginurl=<URL> <username> <pass>
# The name of the user and password CGI field
# Optionally any additional CGI name/value pairs. Note that the default
# values are submitted automatically.
I get the following
WARNING MainThread warning: no user/password authentication data found for
WARNING MainThread warning: disabling login URL
And, of course, I don't get logged in.
Clark Consulting & Research