@@ -0,0 +1,2504 @@
+#!/usr/bin/env python%0A%0Aimport os%0Aimport sys%0Aimport logging%0Aimport argparse%0Aimport pprint%0Afrom phantomjs_loader import PhantomJSLoader%0Afrom chrome_loader import ChromeLoader%0Afrom firefox_loader import FirefoxLoader%0Afrom pythonrequests_loader import PythonRequestsLoader%0Afrom curl_loader import CurlLoader%0Afrom nodejs_loader import NodeJsLoader%0Afrom tcp_loader import TCPLoader%0Afrom tls_loader import TLSLoader%0A%0Adef main():%0A    #loader = NodeJsLoader(num_trials=1, full_page=False, http2=True)%0A    #loader = CurlLoader(num_trials=1, full_page=False)%0A    #loader = PythonRequestsLoader(num_trials=1)%0A    #loader = FirefoxLoader(num_trials=1, headless=False, selenium=False)%0A    #loader = PhantomJSLoader(num_trials=5)%0A    #loader = TCPLoader(num_trials=2, full_page=False, user_agent='Test User Agent', check_protocol_availability=False)%0A    #loader = TLSLoader(num_trials=2, full_page=False, test_session_resumption=True, timeout=10)%0A    #loader = TLSLoader(num_trials=2, full_page=False, test_false_start=True, timeout=10)%0A    loader = ChromeLoader(num_trials=1, disable_quic=False, disable_spdy=True,%5C%0A        save_packet_capture=True, log_ssl_keys=True)%0A    loader.load_pages(%5B'https://www.google.com', 'https://www.youtube.com'%5D)%0A    print loader.urls%0A    pprint.pprint(dict(loader.load_results))%0A    pprint.pprint(dict(loader.page_results))%0A%0Aif __name__ == %22__main__%22:%0A    # set up command line args%0A    parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter,%5C%0A                                     description='Web page profiler.')%0A    parser.add_argument('-o', '--outdir', default='.', help='Destination directory for HAR files.')%0A    parser.add_argument('-q', '--quiet', action='store_true', default=False, help='only print errors')%0A    parser.add_argument('-v', '--verbose', action='store_true', default=False, help='print debug info. --quiet wins if both are present')%0A    args = parser.parse_args()%0A%0A    if not os.path.isdir(args.outdir):%0A        try:%0A            os.makedirs(args.outdir)%0A        except Exception as e:%0A            logging.getLogger(__name__).error('Error making output directory: %25s' %25 args.outdir)%0A            sys.exit(-1)%0A    %0A    # set up logging%0A    if args.quiet:%0A        level = logging.WARNING%0A    elif args.verbose:%0A        level = logging.DEBUG%0A    else:%0A        level = logging.INFO%0A    logging.basicConfig(%0A        format = %22%25(levelname) -10s %25(asctime)s %25(module)s:%25(lineno) -7s %25(message)s%22,%0A        level = level%0A    )%0A%0A    main()%0A

Add mor