diff --git a/src/you_get/extractor.py b/src/you_get/extractor.py index 1a68dbaf..8c7dcf7f 100644 --- a/src/you_get/extractor.py +++ b/src/you_get/extractor.py @@ -22,6 +22,7 @@ class VideoExtractor(): self.url = None self.title = None self.vid = None + self.m3u8_url = None self.streams = {} self.streams_sorted = [] self.audiolang = None @@ -108,6 +109,9 @@ class VideoExtractor(): if stream['size'] != float('inf') and stream['size'] != 0: print(" size: %s MiB (%s bytes)" % (round(stream['size'] / 1048576, 1), stream['size'])) + if 'm3u8_url' in stream: + print(" m3u8_url: {}".format(stream['m3u8_url'])) + if 'itag' in stream: print(" # download-with: %s" % log.sprint("you-get --itag=%s [URL]" % stream_id, log.UNDERLINE)) else: diff --git a/src/you_get/extractors/youku.py b/src/you_get/extractors/youku.py index 1b033634..4ade9774 100644 --- a/src/you_get/extractors/youku.py +++ b/src/you_get/extractors/youku.py @@ -223,7 +223,8 @@ class Youku(VideoExtractor): 'size': stream['size'], 'pieces': [{ 'segs': stream['segs'] - }] + }], + 'm3u8_url': stream['m3u8_url'] } src = [] for seg in stream['segs']: