Skip to content

Instantly share code, notes, and snippets.

@shimarin
Created January 23, 2018 05:41
Show Gist options
  • Save shimarin/ac5fdb2c4a74f98df740874356861837 to your computer and use it in GitHub Desktop.
Save shimarin/ac5fdb2c4a74f98df740874356861837 to your computer and use it in GitHub Desktop.
#!/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)
@shimarin
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment