<reponame>crake7/Defensor-Fortis-
#!/usr/bin/env python
import requests

def download(url):
    '''Get content from URL, create a file named after last item of the URL.
    The file opens for writing only in binary mode.
    '''
    get_response = requests.get(url)
    file_name = url.split('/')[-1]
    with open(file_name, "wb") as output_file:
        output_file.write(get_response.content)

download("https://www.americamagazine.org/sites/default/files/styles/article_image_750_x_503_/public/main_image/iStock-870206880.jpg.png?itok=HIgKCJBD")
#!/usr/bin/env python
import requests

def download(url):
    '''Get content from URL, create a file named after last item of the URL.
    The file opens for writing only in binary mode.
    '''
    get_response = requests.get(url)
    file_name = url.split('/')[-1]
    with open(file_name, "wb") as output_file:
        output_file.write(get_response.content)

download("https://www.americamagazine.org/sites/default/files/styles/article_image_750_x_503_/public/main_image/iStock-870206880.jpg.png?itok=HIgKCJBD")
#!/usr/bin/env python Get content from URL, create a file named after last item of the URL.     The file opens for writing only in binary mode.