avoid errors with using string methods on content_type

pull/91/head
eric 2018-04-18 14:56:26 -04:00
parent 8c1799ebc4
commit c9e7d5d5ac
1 changed files with 2 additions and 2 deletions

View File

@ -447,9 +447,9 @@ class ContentTyper(object):
def content_type(self, url):
try:
r = requests.head(url)
return r.headers.get('content-type')
return r.headers.get('content-type', '')
except:
return None
return ''
def calc_type(self, url):
delay = 1