From 668db403f97eb1b50a3f54266db4bc274f1fa874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Wed, 11 Nov 2015 22:47:28 +0600 Subject: [PATCH] [gorillavid] Add test for vidto.me and strip title --- youtube_dl/extractor/gorillavid.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/gorillavid.py b/youtube_dl/extractor/gorillavid.py index d4fd0449c3..8c982d8e97 100644 --- a/youtube_dl/extractor/gorillavid.py +++ b/youtube_dl/extractor/gorillavid.py @@ -76,6 +76,13 @@ class GorillaVidIE(InfoExtractor): 'title': 'youtube-dl test video \'äBaW_jenozKc.mp4.mp4', 'thumbnail': 're:http://.*\.jpg', } + }, { + 'url': 'http://vidto.me/ku5glz52nqe1.html', + 'info_dict': { + 'id': 'ku5glz52nqe1', + 'ext': 'mp4', + 'title': 'test' + } }] def _real_extract(self, url): @@ -104,12 +111,12 @@ def _real_extract(self, url): webpage = self._download_webpage(req, video_id, 'Downloading video page') - title = self._search_regex( + title = (self._search_regex( [r'style="z-index: [0-9]+;">([^<]+)', r'([^<]+)', r'>Watch (.+) ', r'

([^<]+)

'], - webpage, 'title', default=None) or self._og_search_title(webpage) + webpage, 'title', default=None) or self._og_search_title(webpage)).strip() video_url = self._search_regex( [r'file\s*:\s*["\'](http[^"\']+)["\'],', r'file_link\s*=\s*\'(https?:\/\/[0-9a-zA-z.\/\-_]+)'],