[extractor/common] Make _family_friendly_search optional
authorSergey M․ <dstftw@gmail.com>
Sat, 12 Aug 2017 10:11:35 +0000 (17:11 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 12 Aug 2017 10:11:35 +0000 (17:11 +0700)
youtube_dl/extractor/common.py

index 4d61275fd2726e4bd96493de1006ab0375f87cdf..e565901afce0ec6999a478ddf21b0b6745a6a966 100644 (file)
@@ -940,7 +940,8 @@ class InfoExtractor(object):
 
     def _family_friendly_search(self, html):
         # See http://schema.org/VideoObject
-        family_friendly = self._html_search_meta('isFamilyFriendly', html)
+        family_friendly = self._html_search_meta(
+            'isFamilyFriendly', html, default=None)
 
         if not family_friendly:
             return None