Como testar se uma página da web é uma imagem Python solicitações
import requests
response = requests.head(url)
print response.headers.get('content-type')
Ugliest Unicorn
import requests
response = requests.head(url)
print response.headers.get('content-type')