Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
metadata = dict(
mediatype=('audio' if collection == 'opensource_audio'
else 'movies'),
creator=uploader,
collection=collection,
title=title,
description=description,
date=upload_date,
year=upload_year,
subject=tags_string,
originalurl=videourl,
licenseurl=licenseurl,
# Set 'scanner' metadata pair to allow tracking of TubeUp
# powered uploads, per request from archive.org
scanner='TubeUp Video Stream Mirroring Application {}'.format(__version__))
return metadata
def main():
# Parse arguments from file docstring
args = docopt.docopt(__doc__, version=__version__)
URLs = args['']
proxy_url = args['--proxy']
username = args['--username']
password = args['--password']
quiet_mode = args['--quiet']
debug_mode = args['--debug']
use_download_archive = args['--use-download-archive']
if debug_mode:
# Display log messages.
root = logging.getLogger()
root.setLevel(logging.DEBUG)
ch = logging.StreamHandler(sys.stdout)
ch.setLevel(logging.DEBUG)