mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-19 23:40:29 +00:00
15 lines
421 B
Python
15 lines
421 B
Python
|
|
import os,sys
|
||
|
|
sys.path.append(os.getcwd())
|
||
|
|
import linkcheck
|
||
|
|
config = linkcheck.Config.Configuration()
|
||
|
|
config['recursionlevel'] = 1
|
||
|
|
config['log'] = config.newLogger('test')
|
||
|
|
config["anchors"] = 1
|
||
|
|
config["verbose"] = 1
|
||
|
|
config.disableThreading()
|
||
|
|
htmldir = "test/html"
|
||
|
|
for file in ('https.html'):
|
||
|
|
url = os.path.join(htmldir, file)
|
||
|
|
config.appendUrl(linkcheck.UrlData.GetUrlDataFrom(url, 0))
|
||
|
|
linkcheck.checkUrls(config)
|