From 57b48c246fa74431c994faffb93f169c1628a81e Mon Sep 17 00:00:00 2001 From: charon2019 Date: Tue, 12 Mar 2019 15:56:24 +0100 Subject: [PATCH] Fix ruleporn, fixes #15344 The videofile is in the html now. Simplifies the extractor a lot. Might be part of solution for #20323. --- youtube_dl/extractor/ruleporn.py | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/youtube_dl/extractor/ruleporn.py b/youtube_dl/extractor/ruleporn.py index ebf9808d5..5bc2c65c6 100644 --- a/youtube_dl/extractor/ruleporn.py +++ b/youtube_dl/extractor/ruleporn.py @@ -1,9 +1,9 @@ from __future__ import unicode_literals -from .nuevo import NuevoBaseIE +from .common import InfoExtractor -class RulePornIE(NuevoBaseIE): +class RulePornIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?ruleporn\.com/(?:[^/?#&]+/)*(?P[^/?#&]+)' _TEST = { 'url': 'http://ruleporn.com/brunette-nympho-chick-takes-her-boyfriend-in-every-angle/', @@ -24,21 +24,19 @@ class RulePornIE(NuevoBaseIE): webpage = self._download_webpage(url, display_id) - video_id = self._search_regex( - r'lovehomeporn\.com/embed/(\d+)', webpage, 'video id') + url = self._search_regex( + r']+src="(https?://media.ruleporn.com/media/videos/[a-zA-Z0-9/]+\.mp4)[^>]+>', + webpage, 'url') title = self._search_regex( - r']+title=(["\'])(?P.+?)\1', - webpage, 'title', group='url') + r'

(.+?)

', + webpage, 'title') description = self._html_search_meta('description', webpage) - info = self._extract_nuevo( - 'http://lovehomeporn.com/media/nuevo/econfig.php?key=%s&rp=true' % video_id, - video_id) - info.update({ - 'display_id': display_id, + return { + 'id': display_id, 'title': title, 'description': description, - 'age_limit': 18 - }) - return info + 'age_limit': 18, + 'url': url + }