mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-12 02:20:58 +00:00
Fix login URL cookies and don't sanitize after config reading.
This commit is contained in:
parent
032c4091c3
commit
29193bbcc9
2 changed files with 5 additions and 5 deletions
|
|
@ -218,7 +218,6 @@ class Configuration (dict):
|
|||
filtered_cfiles.append(cfile)
|
||||
log.debug(LOG_CHECK, "reading configuration from %s", filtered_cfiles)
|
||||
confparse.LCConfigParser(self).read(filtered_cfiles)
|
||||
self.sanitize()
|
||||
|
||||
def add_auth (self, user=None, password=None, pattern=None):
|
||||
"""Add given authentication data."""
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import requests
|
|||
import time
|
||||
import urlparse
|
||||
import random
|
||||
from .. import log, LOG_CHECK, strformat
|
||||
from .. import log, LOG_CHECK, strformat, LinkCheckerError
|
||||
from ..decorators import synchronized
|
||||
from ..cache import urlqueue
|
||||
from ..htmlutil import formsearch
|
||||
|
|
@ -89,9 +89,10 @@ class Aggregate (object):
|
|||
for key, value in self.config["loginextrafields"].items():
|
||||
form.data[key] = value
|
||||
formurl = urlparse.urljoin(url, form.url)
|
||||
req = session.post(formurl, data=form.data)
|
||||
self.cookies = req.cookies
|
||||
print "XXX cookies", self.cookies
|
||||
response = session.post(formurl, data=form.data)
|
||||
self.cookies = session.cookies
|
||||
if len(self.cookies) == 0:
|
||||
raise LinkCheckerError("No cookies set by login URL %s" % url)
|
||||
|
||||
@synchronized(_threads_lock)
|
||||
def start_threads (self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue