From 4cc6cb086c368bb7c72b863e2c0eccefcd5150ec Mon Sep 17 00:00:00 2001 From: Father Rope Date: Sun, 13 Aug 2017 04:50:11 +0600 Subject: [PATCH] [porntube] add new extractor --- youtube_dl/extractor/extractors.py | 1 + youtube_dl/extractor/porntube.py | 78 ++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 youtube_dl/extractor/porntube.py diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index f1a9f6edf..583ecddee 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -1337,3 +1337,4 @@ from .zapiks import ZapiksIE from .zaq1 import Zaq1IE from .zdf import ZDFIE, ZDFChannelIE from .zingmp3 import ZingMp3IE +from .porntube import PornTubeIE \ No newline at end of file diff --git a/youtube_dl/extractor/porntube.py b/youtube_dl/extractor/porntube.py new file mode 100644 index 000000000..1a3eec102 --- /dev/null +++ b/youtube_dl/extractor/porntube.py @@ -0,0 +1,78 @@ +from __future__ import unicode_literals + +import os +import re + +from .common import InfoExtractor +from ..compat import ( + compat_urllib_parse_unquote, + compat_urllib_parse_unquote_plus, + compat_urllib_parse_urlparse, + compat_urllib_request, +) +from ..utils import ( + ExtractorError, + str_to_int, +) +from ..aes import ( + aes_decrypt_text +) + + +class PornTubeIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?porntube\.com/videos/.*_(?P[0-9]+)' + _TEST = { + 'url': 'http://www.porntube.com/videos/brazilian-babe-loren-colombara_7091127', + 'md5': '2c0cf65fd77680915fab1843d38fc7c3', + 'info_dict': { + 'id': '7091127', + 'ext': 'mp4', + 'title': 'Brazilian babe Loren Colombara', + 'description': 'Watch Brazilian babe Loren Colombara and other porn movies on PornTube.com. Free Porn Videos in HD and Mobile Ready.', + 'age_limit': 18 + } + } + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + + linkDes = re.findall( + u'icon-download">