1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-24 08:56:48 +00:00

[bbccouk] Fix error handling

This commit is contained in:
Yen Chi Hsuan 2015-06-18 21:40:45 +08:00
parent a69e8bfdd9
commit 974a6146fe

View File

@ -267,7 +267,7 @@ class BBCCoUkIE(InfoExtractor):
programme_id, 'Downloading media selection XML') programme_id, 'Downloading media selection XML')
except ExtractorError as ee: except ExtractorError as ee:
if isinstance(ee.cause, compat_HTTPError) and ee.cause.code == 403: if isinstance(ee.cause, compat_HTTPError) and ee.cause.code == 403:
media_selection = xml.etree.ElementTree.fromstring(ee.cause.read().encode('utf-8')) media_selection = xml.etree.ElementTree.fromstring(ee.cause.read().decode('utf-8'))
else: else:
raise raise