]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[pornhub] Add support for thumbzilla (Closes #8696)
authorSergey M․ <dstftw@gmail.com>
Fri, 1 Jul 2016 19:11:07 +0000 (02:11 +0700)
committerSergey M․ <dstftw@gmail.com>
Fri, 1 Jul 2016 19:11:07 +0000 (02:11 +0700)
youtube_dl/extractor/pornhub.py

index 77182bf07f33a58216a07e84769779149e60833a..c76afe1c4dbecc4819638af5d0946a4419ef338b 100644 (file)
@@ -25,7 +25,15 @@ from ..aes import (
 
 
 class PornHubIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:[a-z]+\.)?pornhub\.com/(?:view_video\.php\?viewkey=|embed/)(?P<id>[0-9a-z]+)'
+    IE_DESC = 'PornHub and Thumbzilla'
+    _VALID_URL = r'''(?x)
+                    https?://
+                        (?:
+                            (?:[a-z]+\.)?pornhub\.com/(?:view_video\.php\?viewkey=|embed/)|
+                            (?:www\.)?thumbzilla\.com/video/
+                        )
+                        (?P<id>[0-9a-z]+)
+                    '''
     _TESTS = [{
         'url': 'http://www.pornhub.com/view_video.php?viewkey=648719015',
         'md5': '1e19b41231a02eba417839222ac9d58e',
@@ -74,6 +82,9 @@ class PornHubIE(InfoExtractor):
         # removed by uploader
         'url': 'http://www.pornhub.com/view_video.php?viewkey=ph572716d15a111',
         'only_matching': True,
+    }, {
+        'url': 'https://www.thumbzilla.com/video/ph56c6114abd99a/horny-girlfriend-sex',
+        'only_matching': True,
     }]
 
     @classmethod