Skip to content

Commit 6e1bfc6

Browse files
committed
liveleak: add original format without watermark
1 parent 4ac73fc commit 6e1bfc6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

youtube_dl/extractor/liveleak.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,17 @@ def _real_extract(self, url):
120120
}
121121

122122
for idx, info_dict in enumerate(entries):
123+
source_found = False
123124
for a_format in info_dict['formats']:
125+
if not source_found:
126+
source_url = re.sub(r'(https?://(?:\w+\.)?liveleak\.com/.*?\.\w+)\.\w+\.mp4((?:\?.+)?)', r'\1\2', a_format['url'])
127+
if source_url != a_format['url']:
128+
source_found = True
129+
info_dict['formats'].append({
130+
'url': source_url,
131+
'format_note': 'original, without watermark',
132+
'format_id': 'source'
133+
})
124134
if not a_format.get('height'):
125135
a_format['height'] = int_or_none(self._search_regex(
126136
r'([0-9]+)p\.mp4', a_format['url'], 'height label',

0 commit comments

Comments
 (0)