diff --git a/youtube_dl/extractor/yam.py b/youtube_dl/extractor/yam.py index 19f8762ae..9d851bae3 100644 --- a/youtube_dl/extractor/yam.py +++ b/youtube_dl/extractor/yam.py @@ -9,6 +9,7 @@ from ..utils import ( float_or_none, month_by_abbreviation, ExtractorError, + get_element_by_attribute, ) @@ -23,6 +24,7 @@ class YamIE(InfoExtractor): 'id': '2283921', 'ext': 'mp3', 'title': '發現 - 趙薇 京華煙雲主題曲', + 'description': '發現 - 趙薇 京華煙雲主題曲', 'uploader_id': 'princekt', 'upload_date': '20080807', 'duration': 313.0, @@ -55,6 +57,17 @@ class YamIE(InfoExtractor): 'ext': 'mp4', }, 'skip': 'invalid YouTube URL', + }, { + 'url': 'http://mymedia.yam.com/m/2373534', + 'md5': '7ff74b91b7a817269d83796f8c5890b1', + 'info_dict': { + 'id': '2373534', + 'ext': 'mp3', + 'title': '林俊傑&蔡卓妍-小酒窩', + 'description': 'md5:904003395a0fcce6cfb25028ff468420', + 'upload_date': '20080928', + 'uploader_id': 'onliner2', + } }] def _real_extract(self, url): @@ -75,15 +88,19 @@ class YamIE(InfoExtractor): if youtube_url: return self.url_result(youtube_url, 'Youtube') + title = self._html_search_regex( + r'