aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Savicki <lao.lav@gmail.com>2016-11-20 02:12:22 +0300
committerSergey M․ <dstftw@gmail.com>2016-11-22 22:16:10 +0700
commit868630fbe5843ea9da5fd6fa826516f0dcbed20e (patch)
treedc8947e82e74ffafba8831021e3a8aba3cd10be2
parent1d6ae5628fc2828f3c321d038983401e7c985884 (diff)
[hellporno] Add support for hellporno.net and improve ext extraction
-rw-r--r--youtube_dl/extractor/hellporno.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/youtube_dl/extractor/hellporno.py b/youtube_dl/extractor/hellporno.py
index 7a1c75b65..10da14067 100644
--- a/youtube_dl/extractor/hellporno.py
+++ b/youtube_dl/extractor/hellporno.py
@@ -6,12 +6,13 @@ from .common import InfoExtractor
from ..utils import (
js_to_json,
remove_end,
+ determine_ext,
)
class HellPornoIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?hellporno\.com/videos/(?P<id>[^/]+)'
- _TEST = {
+ _VALID_URL = r'https?://(?:www\.)?hellporno\.(?:com/videos|net/v)/(?P<id>[^/]+)'
+ _TESTS = [{
'url': 'http://hellporno.com/videos/dixie-is-posing-with-naked-ass-very-erotic/',
'md5': '1fee339c610d2049699ef2aa699439f1',
'info_dict': {
@@ -22,7 +23,10 @@ class HellPornoIE(InfoExtractor):
'thumbnail': 're:https?://.*\.jpg$',
'age_limit': 18,
}
- }
+ }, {
+ 'url': 'http://hellporno.net/v/186271/',
+ 'only_matching': True,
+ }]
def _real_extract(self, url):
display_id = self._match_id(url)
@@ -38,7 +42,7 @@ class HellPornoIE(InfoExtractor):
video_id = flashvars.get('video_id')
thumbnail = flashvars.get('preview_url')
- ext = flashvars.get('postfix', '.mp4')[1:]
+ ext = determine_ext(flashvars.get('postfix'), 'mp4')
formats = []
for video_url_key in ['video_url', 'video_alt_url']: