extractor: Set age limit on some adult-related extractors.
authorRogério Brito <rbrito@ime.usp.br>
Sat, 19 Oct 2013 17:19:25 +0000 (14:19 -0300)
committerRogério Brito <rbrito@ime.usp.br>
Sat, 19 Oct 2013 17:19:25 +0000 (14:19 -0300)
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 <rbrito@ime.usp.br>
youtube_dl/extractor/redtube.py
youtube_dl/extractor/xhamster.py

index 365aade564bd4f423317d427b3070c91e3e22ad3..994778e16758bc292a01e99e5292caee30a6d5c2 100644 (file)
@@ -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,
         }
     }
 
index 361619694980d3260ff81aeed2d0d07294739a0e..f060d90666a75cef01c25341c3d6a843d467a39a 100644 (file)
@@ -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,
         }]