1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 12:15:40 +01:00

get_http_data: remove try-except-clause

This commit is contained in:
Johan Andersson 2014-08-31 00:55:39 +02:00
parent 65143fb9f7
commit e1e56773cb

View File

@ -63,19 +63,7 @@ def get_http_data(url, header=None, data=None, useragent=FIREFOX_UA,
opener = build_opener(HTTPCookieProcessor(cookiejar))
try:
response = opener.open(request)
except HTTPError as e:
log.error("Something wrong with that url")
log.error("Error code: %s", e.code)
sys.exit(5)
except URLError as e:
log.error("Something wrong with that url")
log.error("Error code: %s", e.reason)
sys.exit(5)
except ValueError as e:
log.error("Try adding http:// before the url")
sys.exit(5)
response = opener.open(request)
if is_py3:
data = response.read()
try: