1
0
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:
Johan Andersson 2013-01-15 17:52:04 +01:00
parent e3228813b5
commit 7ab00f2d89

View File

@ -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()