From f7efe6dc958eb0689cb9534ff0b4e592040be8df Mon Sep 17 00:00:00 2001 From: JChris246 <43832407+JChris246@users.noreply.github.com> Date: Wed, 8 Feb 2023 01:20:19 -0400 Subject: [PATCH] [extractor/pornez] Handle relative URLs in iframe (#6171) Authored by: JChris246 Closes #6162 --- yt_dlp/extractor/pornez.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/pornez.py b/yt_dlp/extractor/pornez.py index df0e44a699..3a22cb8210 100644 --- a/yt_dlp/extractor/pornez.py +++ b/yt_dlp/extractor/pornez.py @@ -1,5 +1,5 @@ from .common import InfoExtractor -from ..utils import int_or_none +from ..utils import int_or_none, urljoin class PornezIE(InfoExtractor): @@ -20,7 +20,8 @@ def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) iframe_src = self._html_search_regex( - r']+src="(https?://pornez\.net/player/\?[^"]+)"', webpage, 'iframe', fatal=True) + r']+src="([^"]+)"', webpage, 'iframe', fatal=True) + iframe_src = urljoin('https://pornez.net', iframe_src) title = self._html_search_meta(['name', 'twitter:title', 'og:title'], webpage, 'title', default=None) if title is None: title = self._search_regex(r'

(.*?)

', webpage, 'title', fatal=True)