Created
January 23, 2018 05:41
-
-
Save shimarin/ac5fdb2c4a74f98df740874356861837 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.7 | |
import linkcheck, linkcheck.director, linkcheck.cmdline, linkcheck.logger | |
class MyLogger(linkcheck.logger._Logger): | |
LoggerName = "my" | |
def start_output(self): | |
pass | |
def log_url(self, url_data): | |
print url_data.base_url | |
def end_output(self, **kwargs): | |
pass | |
config = linkcheck.configuration.Configuration() | |
#config.set_status_logger(linkcheck.director.console.StatusLogger()) | |
config['logger'] = MyLogger() | |
aggregate = linkcheck.director.get_aggregate(config) | |
linkcheck.cmdline.aggregate_url(aggregate, "https://www.walbrix.com/") | |
#linkcheck.cmdline.aggregate_url(aggregate, "http://www.stbbs.net/hoge") | |
linkcheck.director.check_urls(aggregate) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/wummel/linkchecker/blob/master/linkcheck/logger/sql.py