def _download_xml(self, url_or_request, video_id,
note=u'Downloading XML', errnote=u'Unable to download XML',
- transform_source=None):
+ transform_source=None, fatal=True):
"""Return the xml as an xml.etree.ElementTree.Element"""
- xml_string = self._download_webpage(url_or_request, video_id, note, errnote)
+ xml_string = self._download_webpage(
+ url_or_request, video_id, note, errnote, fatal=fatal)
+ if xml_string is False:
+ return xml_string
if transform_source:
xml_string = transform_source(xml_string)
return xml.etree.ElementTree.fromstring(xml_string.encode('utf-8'))
)
formats.sort(key=_formats_key)
+ def http_scheme(self):
+ """ Either "https:" or "https:", depending on the user's preferences """
+ return (
+ 'http:'
+ if self._downloader.params.get('prefer_insecure', False)
+ else 'https:')
+
class SearchInfoExtractor(InfoExtractor):
"""
@property
def SEARCH_KEY(self):
return self._SEARCH_KEY
+