def main():

    logger = get_logger()

    parser = argparse.ArgumentParser()
    parser.add_argument("web_url",help="url of YouTube video used on website")
    args = parser.parse_args(sys.argv[1:])
    web_url = args.web_url

    formats = util.get_available_formats(web_url)

    for fmt in formats:
        logger.info("Format: %s, %s" % (fmt,util.YOUTUBE_FORMATS[fmt]))
        streaming_url = util.get_streaming_url(web_url,fmt)
        logger.info("Streaming URL: %s" % streaming_url)
        run_time = util.run_timed_movie_cube(streaming_url)
        logger.info("Run time for [%s,%s]: %s" % (fmt,util.YOUTUBE_FORMATS[fmt],run_time))
Beispiel #2
0
def main():

    logger = get_logger()

    parser = argparse.ArgumentParser()
    parser.add_argument("web_url", help="url of YouTube video used on website")
    args = parser.parse_args(sys.argv[1:])
    web_url = args.web_url

    formats = util.get_available_formats(web_url)

    for fmt in formats:
        logger.info("Format: %s, %s" % (fmt, util.YOUTUBE_FORMATS[fmt]))
        streaming_url = util.get_streaming_url(web_url, fmt)
        logger.info("Streaming URL: %s" % streaming_url)
        run_time = util.run_timed_movie_cube(streaming_url)
        logger.info("Run time for [%s,%s]: %s" %
                    (fmt, util.YOUTUBE_FORMATS[fmt], run_time))
def main():

    logger = get_logger()

    parser = argparse.ArgumentParser()
    parser.add_argument("web_url",help="url of YouTube video used on website")
    args = parser.parse_args(sys.argv[1:])
    web_url = args.web_url

    available_formats = util.get_available_formats(web_url)
    print available_formats
    logger.info("available_formats : %s" % available_formats)

    testable_formats = set(available_formats) & set(FORMATS)
    logger.info("testable_formats : %s" % testable_formats)

    logger.info("width: %s, height: %s" % (WIDTH,HEIGHT))

    for fmt in testable_formats:
        logger.info("Format: %s, %s" % (fmt,util.YOUTUBE_FORMATS[fmt]))
        streaming_url = util.get_streaming_url(web_url,fmt)
        logger.info("Streaming URL: %s" % streaming_url)
        run_time = util.run_timed_movie_cube(streaming_url,WIDTH,HEIGHT)
        logger.info("Run time for [%s,%s]: %s" % (fmt,util.YOUTUBE_FORMATS[fmt],run_time))