diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-10-06 16:23:18 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-10-06 16:23:18 +0200 |
commit | 2a69c6b87910d3dbeec14d3c6f7e16855944a0ad (patch) | |
tree | 80c395e99529f4b805d79978d82c6beaf37ff7bb /youtube_dl/extractor/common.py | |
parent | e484c81f0c0a6faf959037ac03b504e4794d72df (diff) | |
parent | cfadd183c4a281e97fba89501d59ee344bcc5978 (diff) |
Merge branch 'age_limit'
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r-- | youtube_dl/extractor/common.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 69cdcdc1b..2a5a85dc6 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -54,6 +54,7 @@ class InfoExtractor(object): view_count: How many users have watched the video on the platform. urlhandle: [internal] The urlHandle to be used to download the file, like returned by urllib.request.urlopen + age_limit: Age restriction for the video, as an integer (years) formats: A list of dictionaries for each format available, it must be ordered from worst to best quality. Potential fields: * url Mandatory. The URL of the video file @@ -318,6 +319,15 @@ class InfoExtractor(object): self._og_regex('video')], html, name, **kargs) + def _rta_search(self, html): + # See http://www.rtalabel.org/index.php?content=howtofaq#single + if re.search(r'(?ix)<meta\s+name="rating"\s+' + r' content="RTA-5042-1996-1400-1577-RTA"', + html): + return 18 + return 0 + + class SearchInfoExtractor(InfoExtractor): """ Base class for paged search queries extractors. |