Main class.

async def main():
    """ Main class."""
    opts, args = option_parser()
    url = args[0]

    if opts.links:
        getlinks(url)
        raise SystemExit(0)

    depth = opts.depth

    sTime = time.time()
    webcrawler = Webcrawler(url, depth)
    webcrawler.crawl()
    eTime = time.time()
    tTime = eTime - sTime
    print("CRAWLER STARTED:")
    print("%s, will crawl upto depth %d" % (url, depth))
    print("*****RESULTS")
    print("\n".join(webcrawler.urls))
    print("=" * 100)
    print("Crawler Statistics")
    print("=" * 100)
    print("No of links Found: %d" % webcrawler.links)
    print("No of followed:     %d" % webcrawler.followed)
    print("Time Stats : Found all links  after %0.2fs" % tTime)