]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/abc.py
[extractor/generic] Remove HEAD request
[yt-dlp.git] / yt_dlp / extractor / abc.py
index 354453a2743c3a810036524d5dcf077ee35cf637..03f10ab23d6c218a6ba256772bb076c1a8855742 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import unicode_literals
-
 import hashlib
 import hmac
 import re
@@ -213,7 +211,7 @@ def tokenize_url(url, token):
                 'hdnea': token,
             })
 
-        for sd in ('720', 'sd', 'sd-low'):
+        for sd in ('1080', '720', 'sd', 'sd-low'):
             sd_url = try_get(
                 stream, lambda x: x['streams']['hls'][sd], compat_str)
             if not sd_url:
@@ -300,11 +298,10 @@ def _real_extract(self, url):
             unescapeHTML(webpage_data).encode('utf-8').decode('unicode_escape'), show_id)
         video_data = video_data['route']['pageData']['_embedded']
 
-        if self.get_param('noplaylist') and 'highlightVideo' in video_data:
-            self.to_screen('Downloading just the highlight video because of --no-playlist')
-            return self.url_result(video_data['highlightVideo']['shareUrl'], ie=ABCIViewIE.ie_key())
+        highlight = try_get(video_data, lambda x: x['highlightVideo']['shareUrl'])
+        if not self._yes_playlist(show_id, bool(highlight), video_label='highlight video'):
+            return self.url_result(highlight, ie=ABCIViewIE.ie_key())
 
-        self.to_screen(f'Downloading playlist {show_id} - add --no-playlist to just download the highlight video')
         series = video_data['selectedSeries']
         return {
             '_type': 'playlist',