mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
get_one_media: override filename if it is set automagic
This commit is contained in:
parent
c19ba14e4c
commit
ebe21c49c5
@ -58,6 +58,7 @@ class Options:
|
||||
self.force_subtitle = False
|
||||
self.preferred = None
|
||||
self.verbose = False
|
||||
self.output_auto = False
|
||||
|
||||
def get_media(url, options):
|
||||
|
||||
@ -93,6 +94,7 @@ def get_one_media(stream, options):
|
||||
data = stream.get_urldata()
|
||||
match = re.search(r"(?i)<title[^>]*>\s*(.*?)\s*</title>", data, re.S)
|
||||
if match:
|
||||
options.output_auto = True
|
||||
title_tag = decode_html_entities(match.group(1))
|
||||
if not options.output:
|
||||
options.output = filenamify(title_tag)
|
||||
|
Loading…
Reference in New Issue
Block a user