aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/common.py
diff options
context:
space:
mode:
authorCharles Chen <chaochichen@gmail.com>2014-07-22 14:44:38 -0700
committerCharles Chen <chaochichen@gmail.com>2014-07-22 14:44:38 -0700
commitc4f731262dbee921147b94aac5035b5d9ec75502 (patch)
tree98a93f1de2b7c71a8e25fa072515b4efc5f43ea1 /youtube_dl/extractor/common.py
parent07cc63f386c6afe253b7707631663072d2fb8789 (diff)
parente42a692f003eabdb1efad7b9f4b10ce97c712d32 (diff)
Merge remote-tracking branch 'upstream/master' into MLB
Conflicts: youtube_dl/extractor/mlb.py
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r--youtube_dl/extractor/common.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index e68657314..9b36e0789 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -69,6 +69,7 @@ class InfoExtractor(object):
* vcodec Name of the video codec in use
* container Name of the container format
* filesize The number of bytes, if known in advance
+ * filesize_approx An estimate for the number of bytes
* player_url SWF Player URL (used for rtmpdump).
* protocol The protocol that will be used for the actual
download, lower-case.
@@ -468,7 +469,7 @@ class InfoExtractor(object):
display_name = name
return self._html_search_regex(
r'''(?ix)<meta
- (?=[^>]+(?:itemprop|name|property)=["\']%s["\'])
+ (?=[^>]+(?:itemprop|name|property)=["\']?%s["\']?)
[^>]+content=["\']([^"\']+)["\']''' % re.escape(name),
html, display_name, fatal=fatal, **kwargs)
@@ -555,6 +556,7 @@ class InfoExtractor(object):
f.get('abr') if f.get('abr') is not None else -1,
audio_ext_preference,
f.get('filesize') if f.get('filesize') is not None else -1,
+ f.get('filesize_approx') if f.get('filesize_approx') is not None else -1,
f.get('format_id'),
)
formats.sort(key=_formats_key)