mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
options.output failed when the title tag had an attribute
This commit is contained in:
parent
e3228813b5
commit
7ab00f2d89
@ -1108,7 +1108,7 @@ def get_media(url, options):
|
||||
|
||||
if not options.output or os.path.isdir(options.output):
|
||||
data = get_http_data(url)
|
||||
match = re.search("(?i)<title>\s*(.*?)\s*</title>", data)
|
||||
match = re.search("(?i)<title.*>\s*(.*?)\s*</title>", data)
|
||||
if match:
|
||||
if sys.version_info > (3, 0):
|
||||
title = re.sub('[^\w\s-]', '', match.group(1)).strip().lower()
|
||||
|
Loading…
Reference in New Issue
Block a user