summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhilipp Hagemeister <[email protected]>2014-11-15 15:21:34 +0100
committerPhilipp Hagemeister <[email protected]>2014-11-15 15:21:34 +0100
commitbbefcf04bf953a24d3cfaa3ac0eeab04589aed73 (patch)
treee8700185480fcb92a519e2e8b7c9c889b9d76110
parentc7b0add86f67942b8e68c1b9dd537132e9383d2f (diff)
downloadyoutube-dl-bbefcf04bf953a24d3cfaa3ac0eeab04589aed73.tar.gz
youtube-dl-bbefcf04bf953a24d3cfaa3ac0eeab04589aed73.zip
[goldenmoustache] Fix title (Closes #4203)
-rw-r--r--youtube_dl/extractor/goldenmoustache.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/youtube_dl/extractor/goldenmoustache.py b/youtube_dl/extractor/goldenmoustache.py
index f2e231bf4..7e13b131b 100644
--- a/youtube_dl/extractor/goldenmoustache.py
+++ b/youtube_dl/extractor/goldenmoustache.py
@@ -10,7 +10,7 @@ from ..utils import (
class GoldenMoustacheIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?goldenmoustache\.com/(?P<display_id>[\w-]+)-(?P<id>\d+)'
- _TEST = {
+ _TESTS = [{
'url': 'http://www.goldenmoustache.com/suricate-le-poker-3700/',
'md5': '0f904432fa07da5054d6c8beb5efb51a',
'info_dict': {
@@ -21,7 +21,18 @@ class GoldenMoustacheIE(InfoExtractor):
'thumbnail': 're:^https?://.*\.jpg$',
'view_count': int,
}
- }
+ }, {
+ 'url': 'http://www.goldenmoustache.com/le-lab-tout-effacer-mc-fly-et-carlito-55249/',
+ 'md5': '27f0c50fb4dd5f01dc9082fc67cd5700',
+ 'info_dict': {
+ 'id': '55249',
+ 'ext': 'mp4',
+ 'title': 'Le LAB - Tout Effacer (Mc Fly et Carlito)',
+ 'description': 'md5:9b7fbf11023fb2250bd4b185e3de3b2a',
+ 'thumbnail': 're:^https?://.*\.(?:png|jpg)$',
+ 'view_count': int,
+ }
+ }]
def _real_extract(self, url):
video_id = self._match_id(url)
@@ -30,7 +41,7 @@ class GoldenMoustacheIE(InfoExtractor):
video_url = self._html_search_regex(
r'data-src-type="mp4" data-src="([^"]+)"', webpage, 'video URL')
title = self._html_search_regex(
- r'<title>(.*?) - Golden Moustache</title>', webpage, 'title')
+ r'<title>(.*?)(?: - Golden Moustache)?</title>', webpage, 'title')
thumbnail = self._og_search_thumbnail(webpage)
description = self._og_search_description(webpage)
view_count = int_or_none(self._html_search_regex(