Skip to content

Commit

Permalink
liveleak: add original format without watermark
Browse files Browse the repository at this point in the history
  • Loading branch information
jomo committed Sep 23, 2018
1 parent 4ac73fc commit 6e1bfc6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions youtube_dl/extractor/liveleak.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,17 @@ def _real_extract(self, url):
}

for idx, info_dict in enumerate(entries):
source_found = False
for a_format in info_dict['formats']:
if not source_found:
source_url = re.sub(r'(https?://(?:\w+\.)?liveleak\.com/.*?\.\w+)\.\w+\.mp4((?:\?.+)?)', r'\1\2', a_format['url'])
if source_url != a_format['url']:
source_found = True
info_dict['formats'].append({
'url': source_url,
'format_note': 'original, without watermark',
'format_id': 'source'
})
if not a_format.get('height'):
a_format['height'] = int_or_none(self._search_regex(
r'([0-9]+)p\.mp4', a_format['url'], 'height label',
Expand Down

0 comments on commit 6e1bfc6

Please sign in to comment.