Browse Source

[bbccouk] Fix error handling

master
Yen Chi Hsuan 9 years ago
parent
commit
974a6146fe
1 changed files with 1 additions and 1 deletions
  1. 2
      youtube_dl/extractor/bbccouk.py

2
youtube_dl/extractor/bbccouk.py

@ -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

Loading…
Cancel
Save