aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M <dstftw@gmail.com>2014-10-06 01:47:22 +0700
committerSergey M <dstftw@gmail.com>2014-10-06 01:47:22 +0700
commite4b85e35d083fca70d29a751c01071e287b5cdae (patch)
tree8b50a2a1e4b555b1eeafe3beddebed2ce5f59f06 /youtube_dl
parentbb0c206f592b47982753bc63d1ee49868c925cec (diff)
downloadyoutube-dl-e4b85e35d083fca70d29a751c01071e287b5cdae.tar.xz
[gorillavid] Fix title extraction and make thumbnail optional (Closes #3884)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/gorillavid.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/youtube_dl/extractor/gorillavid.py b/youtube_dl/extractor/gorillavid.py
index 8c3ad8c7d..0f0012f1f 100644
--- a/youtube_dl/extractor/gorillavid.py
+++ b/youtube_dl/extractor/gorillavid.py
@@ -5,6 +5,7 @@ import re
from .common import InfoExtractor
from ..utils import (
+ ExtractorError,
determine_ext,
compat_urllib_parse,
compat_urllib_request,
@@ -25,7 +26,7 @@ class GorillaVidIE(InfoExtractor):
'info_dict': {
'id': '06y9juieqpmi',
'ext': 'flv',
- 'title': 'Rebecca Black My Moment Official Music Video Reaction',
+ 'title': 'Rebecca Black My Moment Official Music Video Reaction-6GK87Rc8bzQ',
'thumbnail': 're:http://.*\.jpg',
},
}, {
@@ -72,14 +73,14 @@ class GorillaVidIE(InfoExtractor):
webpage = self._download_webpage(req, video_id, 'Downloading video page')
- title = self._search_regex(r'style="z-index: [0-9]+;">([0-9a-zA-Z ]+)(?:-.+)?</span>', webpage, 'title')
- thumbnail = self._search_regex(r'image:\'(http[^\']+)\',', webpage, 'thumbnail')
- url = self._search_regex(r'file: \'(http[^\']+)\',', webpage, 'file url')
+ title = self._search_regex(r'style="z-index: [0-9]+;">([^<]+)</span>', webpage, 'title')
+ video_url = self._search_regex(r'file\s*:\s*\'(http[^\']+)\',', webpage, 'file url')
+ thumbnail = self._search_regex(r'image\s*:\s*\'(http[^\']+)\',', webpage, 'thumbnail', fatal=False)
formats = [{
'format_id': 'sd',
- 'url': url,
- 'ext': determine_ext(url),
+ 'url': video_url,
+ 'ext': determine_ext(video_url),
'quality': 1,
}]