Use urllib to download the requested file from the target URL. Use the click progress bar to print download
        progress
        :param target_url: URL from which the file is to be downloaded
        :param output_file: Name and path of local copy of file

def url_request(target_url, output_file):
        """
        Use urllib to download the requested file from the target URL. Use the click progress bar to print download
        progress
        :param target_url: URL from which the file is to be downloaded
        :param output_file: Name and path of local copy of file
        """
        # Create the request
        request = urllib.request.urlopen(target_url)
        # Open the destination file to write
        with open(output_file, 'wb') as targets:
            # Calculate the total file size - will be used by the progress bar
            total_length = int(request.headers.get('content-length'))
            # Create a click progress bar using the total length calculated above
            with click.progressbar(length=total_length,
                                   label='Downloading files') as bar:
                while True:
                    # Break up the download into chunks of 4096 bytes
                    data = request.read(4096)
                    # Break the loop when the download finishes/errors
                    if not data:
                        break
                    # Write the chunk to file
                    targets.write(data)
                    # Update the progress bar
                    bar.update(len(data))