From 0a0de8fb2deb80bc82f2005cdc2cb5407a3e9e2a Mon Sep 17 00:00:00 2001 From: Parmjit Virk Date: Fri, 6 Apr 2018 05:10:31 -0500 Subject: [PATCH 1/2] [DrTuber] Fix title extraction --- youtube_dl/extractor/drtuber.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/drtuber.py b/youtube_dl/extractor/drtuber.py index c88b3126b..509f5a7c6 100644 --- a/youtube_dl/extractor/drtuber.py +++ b/youtube_dl/extractor/drtuber.py @@ -68,7 +68,8 @@ class DrTuberIE(InfoExtractor): title = self._html_search_regex( (r'class="title_watch"[^>]*><(?:p|h\d+)[^>]*>([^<]+)<', r']+class="title_substrate">([^<]+)

', - r'([^<]+) - \d+'), + r'<title>([^<]+) - \d+', + r'<h1[^>]+class="title">([^<]+)</h1>'), webpage, 'title') thumbnail = self._html_search_regex( From 20fa8c5866b03839424bdd4e612bc48fcdd63528 Mon Sep 17 00:00:00 2001 From: Sergey M <dstftw@gmail.com> Date: Sat, 7 Apr 2018 21:38:46 +0700 Subject: [PATCH 2/2] Update drtuber.py --- youtube_dl/extractor/drtuber.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/drtuber.py b/youtube_dl/extractor/drtuber.py index 509f5a7c6..5c41c8022 100644 --- a/youtube_dl/extractor/drtuber.py +++ b/youtube_dl/extractor/drtuber.py @@ -66,10 +66,11 @@ class DrTuberIE(InfoExtractor): self._sort_formats(formats) title = self._html_search_regex( - (r'class="title_watch"[^>]*><(?:p|h\d+)[^>]*>([^<]+)<', + (r'<h1[^>]+class=["\']title[^>]+>([^<]+)', + r'<title>([^<]+)\s*@\s+DrTuber', + r'class="title_watch"[^>]*><(?:p|h\d+)[^>]*>([^<]+)<', r'<p[^>]+class="title_substrate">([^<]+)</p>', - r'<title>([^<]+) - \d+', - r'<h1[^>]+class="title">([^<]+)</h1>'), + r'<title>([^<]+) - \d+'), webpage, 'title') thumbnail = self._html_search_regex(