aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-06-22 00:20:45 +0700
committerSergey M․ <dstftw@gmail.com>2017-06-22 00:20:45 +0700
commit97b6e3011370a851b942bca144afb7cb08a57f5d (patch)
treed3ee866fb5ff04ce165059f99054ee59d3450f4e /youtube_dl
parent9be9ec5980c1c53642eb112ccced3246ac8a391e (diff)
[youporn] Fix title extraction (closes #13456)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/youporn.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/youtube_dl/extractor/youporn.py b/youtube_dl/extractor/youporn.py
index 34ab878a4..7bc2cefc7 100644
--- a/youtube_dl/extractor/youporn.py
+++ b/youtube_dl/extractor/youporn.py
@@ -68,9 +68,12 @@ class YouPornIE(InfoExtractor):
webpage = self._download_webpage(request, display_id)
title = self._search_regex(
- [r'(?:video_titles|videoTitle)\s*[:=]\s*(["\'])(?P<title>.+?)\1',
- r'<h1[^>]+class=["\']heading\d?["\'][^>]*>([^<])<'],
- webpage, 'title', group='title')
+ [r'(?:video_titles|videoTitle|title)\s*[:=]\s*(["\'])(?P<title>(?:(?!\1).)+)\1',
+ r'<h1[^>]+class=["\']heading\d?["\'][^>]*>(?P<title>[^<]+)<'],
+ webpage, 'title', group='title',
+ default=None) or self._og_search_title(
+ webpage, default=None) or self._html_search_meta(
+ 'title', webpage, fatal=True)
links = []