Skip to content

Commit

Permalink
[extractor/pornez] Handle relative URLs in iframe (#6171)
Browse files Browse the repository at this point in the history
Authored by: JChris246
Closes #6162
  • Loading branch information
JChris246 committed Feb 8, 2023
1 parent b1bde57 commit f7efe6d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions yt_dlp/extractor/pornez.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .common import InfoExtractor
from ..utils import int_or_none
from ..utils import int_or_none, urljoin


class PornezIE(InfoExtractor):
Expand All @@ -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'<iframe[^>]+src="(https?://pornez\.net/player/\?[^"]+)"', webpage, 'iframe', fatal=True)
r'<iframe[^>]+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'<h1>(.*?)</h1>', webpage, 'title', fatal=True)
Expand Down

0 comments on commit f7efe6d

Please sign in to comment.