aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaglis Jonaitis <njonaitis@gmail.com>2015-02-08 17:45:38 +0200
committerNaglis Jonaitis <njonaitis@gmail.com>2015-02-08 17:45:38 +0200
commit641eb10d34629c177445dd38e9d3f1f73c4cb92f (patch)
tree069bb0ae4450761e98e9b74c7406e1674c0bbcc0
parent69319969de40f62ccf1c471427d309b6555483f9 (diff)
Use _family_friendly_search for determining age_limit
-rw-r--r--youtube_dl/extractor/aparat.py2
-rw-r--r--youtube_dl/extractor/goshgay.py4
-rw-r--r--youtube_dl/extractor/izlesene.py5
-rw-r--r--youtube_dl/extractor/teamcoco.py7
4 files changed, 9 insertions, 9 deletions
diff --git a/youtube_dl/extractor/aparat.py b/youtube_dl/extractor/aparat.py
index 5d70758a3..63429780e 100644
--- a/youtube_dl/extractor/aparat.py
+++ b/youtube_dl/extractor/aparat.py
@@ -20,6 +20,7 @@ class AparatIE(InfoExtractor):
'id': 'wP8On',
'ext': 'mp4',
'title': 'تیم گلکسی 11 - زومیت',
+ 'age_limit': 0,
},
# 'skip': 'Extremely unreliable',
}
@@ -55,4 +56,5 @@ class AparatIE(InfoExtractor):
'url': video_url,
'ext': 'mp4',
'thumbnail': thumbnail,
+ 'age_limit': self._family_friendly_search(webpage),
}
diff --git a/youtube_dl/extractor/goshgay.py b/youtube_dl/extractor/goshgay.py
index b116d251d..1d9166455 100644
--- a/youtube_dl/extractor/goshgay.py
+++ b/youtube_dl/extractor/goshgay.py
@@ -34,8 +34,6 @@ class GoshgayIE(InfoExtractor):
duration = parse_duration(self._html_search_regex(
r'<span class="duration">\s*-?\s*(.*?)</span>',
webpage, 'duration', fatal=False))
- family_friendly = self._html_search_meta(
- 'isFamilyFriendly', webpage, default='false')
flashvars = compat_parse_qs(self._html_search_regex(
r'<embed.+?id="flash-player-embed".+?flashvars="([^"]+)"',
@@ -49,5 +47,5 @@ class GoshgayIE(InfoExtractor):
'title': title,
'thumbnail': thumbnail,
'duration': duration,
- 'age_limit': 0 if family_friendly == 'true' else 18,
+ 'age_limit': self._family_friendly_search(webpage),
}
diff --git a/youtube_dl/extractor/izlesene.py b/youtube_dl/extractor/izlesene.py
index d16d483ee..99a1361f8 100644
--- a/youtube_dl/extractor/izlesene.py
+++ b/youtube_dl/extractor/izlesene.py
@@ -80,9 +80,6 @@ class IzleseneIE(InfoExtractor):
r'comment_count\s*=\s*\'([^\']+)\';',
webpage, 'comment_count', fatal=False)
- family_friendly = self._html_search_meta(
- 'isFamilyFriendly', webpage, 'age limit', fatal=False)
-
content_url = self._html_search_meta(
'contentURL', webpage, 'content URL', fatal=False)
ext = determine_ext(content_url, 'mp4')
@@ -120,6 +117,6 @@ class IzleseneIE(InfoExtractor):
'duration': duration,
'view_count': int_or_none(view_count),
'comment_count': int_or_none(comment_count),
- 'age_limit': 18 if family_friendly == 'False' else 0,
+ 'age_limit': self._family_friendly_search(webpage),
'formats': formats,
}
diff --git a/youtube_dl/extractor/teamcoco.py b/youtube_dl/extractor/teamcoco.py
index 18a823719..e85d452a3 100644
--- a/youtube_dl/extractor/teamcoco.py
+++ b/youtube_dl/extractor/teamcoco.py
@@ -15,7 +15,8 @@ class TeamcocoIE(InfoExtractor):
'id': '80187',
'ext': 'mp4',
'title': 'Conan Becomes A Mary Kay Beauty Consultant',
- 'description': 'Mary Kay is perhaps the most trusted name in female beauty, so of course Conan is a natural choice to sell their products.'
+ 'description': 'Mary Kay is perhaps the most trusted name in female beauty, so of course Conan is a natural choice to sell their products.',
+ 'age_limit': 0,
}
}, {
'url': 'http://teamcoco.com/video/louis-ck-interview-george-w-bush',
@@ -24,7 +25,8 @@ class TeamcocoIE(InfoExtractor):
'id': '19705',
'ext': 'mp4',
"description": "Louis C.K. got starstruck by George W. Bush, so what? Part one.",
- "title": "Louis C.K. Interview Pt. 1 11/3/11"
+ "title": "Louis C.K. Interview Pt. 1 11/3/11",
+ 'age_limit': 0,
}
}
]
@@ -83,4 +85,5 @@ class TeamcocoIE(InfoExtractor):
'title': self._og_search_title(webpage),
'thumbnail': self._og_search_thumbnail(webpage),
'description': self._og_search_description(webpage),
+ 'age_limit': self._family_friendly_search(webpage),
}