From 8ed6b34477367ff2900a0e8b3628056188598fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= Date: Fri, 18 Oct 2013 19:32:37 -0300 Subject: [PATCH 1/2] extractor: Set age limit on some adult-related extractors. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is similar in spirit to what was done in commit 8e590a117f. Signed-off-by: Rogério Brito --- youtube_dl/extractor/xvideos.py | 4 +++- youtube_dl/extractor/youporn.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/xvideos.py b/youtube_dl/extractor/xvideos.py index c3b9736d7..90138d7e5 100644 --- a/youtube_dl/extractor/xvideos.py +++ b/youtube_dl/extractor/xvideos.py @@ -13,7 +13,8 @@ class XVideosIE(InfoExtractor): u'file': u'939581.flv', u'md5': u'1d0c835822f0a71a7bf011855db929d0', u'info_dict': { - u"title": u"Funny Porns By >>>>S<<<<<< -1" + u"title": u"Funny Porns By >>>>S<<<<<< -1", + u"age_limit": 18, } } @@ -46,6 +47,7 @@ class XVideosIE(InfoExtractor): 'ext': 'flv', 'thumbnail': video_thumbnail, 'description': None, + 'age_limit': 18, } return [info] diff --git a/youtube_dl/extractor/youporn.py b/youtube_dl/extractor/youporn.py index b1f93dd1b..e3b56cece 100644 --- a/youtube_dl/extractor/youporn.py +++ b/youtube_dl/extractor/youporn.py @@ -26,7 +26,8 @@ class YouPornIE(InfoExtractor): u"upload_date": u"20101221", u"description": u"Love & Sex Answers: http://bit.ly/DanAndJenn -- Is It Unhealthy To Masturbate Daily?", u"uploader": u"Ask Dan And Jennifer", - u"title": u"Sex Ed: Is It Safe To Masturbate Daily?" + u"title": u"Sex Ed: Is It Safe To Masturbate Daily?", + u"age_limit": 18, } } From 50a6150ed9a0d5af39c27b5dba1e06deadd767cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= Date: Sat, 19 Oct 2013 14:19:25 -0300 Subject: [PATCH 2/2] extractor: Set age limit on some adult-related extractors. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit More age limit of videos for adult-related sites. Note that, for redtube, I explicitly left the variable containing the age limit, since the comment justifying the age limit is a good thing to have. That being said, I included the age limit field on the test, to better reflect what the information extractor does (even if it may not break the automated tests). Signed-off-by: Rogério Brito --- youtube_dl/extractor/redtube.py | 3 ++- youtube_dl/extractor/xhamster.py | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/youtube_dl/extractor/redtube.py b/youtube_dl/extractor/redtube.py index 365aade56..994778e16 100644 --- a/youtube_dl/extractor/redtube.py +++ b/youtube_dl/extractor/redtube.py @@ -10,7 +10,8 @@ class RedTubeIE(InfoExtractor): u'file': u'66418.mp4', u'md5': u'7b8c22b5e7098a3e1c09709df1126d2d', u'info_dict': { - u"title": u"Sucked on a toilet" + u"title": u"Sucked on a toilet", + u"age_limit": 18, } } diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py index 361619694..f060d9066 100644 --- a/youtube_dl/extractor/xhamster.py +++ b/youtube_dl/extractor/xhamster.py @@ -19,7 +19,8 @@ class XHamsterIE(InfoExtractor): u'info_dict': { u"upload_date": u"20121014", u"uploader_id": u"Ruseful2011", - u"title": u"FemaleAgent Shy beauty takes the bait" + u"title": u"FemaleAgent Shy beauty takes the bait", + u"age_limit": 18, } }, { @@ -29,7 +30,8 @@ class XHamsterIE(InfoExtractor): u'info_dict': { u"upload_date": u"20130914", u"uploader_id": u"jojo747400", - u"title": u"Britney Spears Sexy Booty" + u"title": u"Britney Spears Sexy Booty", + u"age_limit": 18, } }] @@ -80,5 +82,6 @@ class XHamsterIE(InfoExtractor): 'description': video_description, 'upload_date': video_upload_date, 'uploader_id': video_uploader_id, - 'thumbnail': video_thumbnail + 'thumbnail': video_thumbnail, + 'age_limit': 18, }]