From 9ef4f12b534578ae3d3e47815492c90826c03c36 Mon Sep 17 00:00:00 2001 From: felix Date: Tue, 17 Mar 2015 18:54:36 +0100 Subject: [PATCH] testcases for libsyn and The Daily Show Podcast extractors --- youtube_dl/extractor/comedycentral.py | 4 ++++ youtube_dl/extractor/libsyn.py | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/youtube_dl/extractor/comedycentral.py b/youtube_dl/extractor/comedycentral.py index e427b9821..bd3817b56 100644 --- a/youtube_dl/extractor/comedycentral.py +++ b/youtube_dl/extractor/comedycentral.py @@ -276,6 +276,10 @@ class ComedyCentralShowsIE(MTVServicesInfoExtractor): class TheDailyShowPodcastIE(InfoExtractor): _VALID_URL = r'(?Phttps?:)?//thedailyshow\.cc\.com/podcast/(?P[a-z\-]+)' + _TESTS = [{ + "url": "http://thedailyshow.cc.com/podcast/episodetwelve", + 'only_matching': True, + }] def _real_extract(self, url): display_id = self._match_id(url) diff --git a/youtube_dl/extractor/libsyn.py b/youtube_dl/extractor/libsyn.py index 4b5029f89..88379f276 100644 --- a/youtube_dl/extractor/libsyn.py +++ b/youtube_dl/extractor/libsyn.py @@ -6,6 +6,15 @@ from ..utils import ( class LibsynIE(InfoExtractor): _VALID_URL = r'(?:https?:)?//html5-player\.libsyn\.com/embed/episode/id/(?P[0-9]+)(?:/.*)?' + _TESTS = [{ + 'url': "http://html5-player.libsyn.com/embed/episode/id/3377616/", + 'info_dict': { + 'id': "3377616", + 'ext': "mp3", + 'title': "Episode 12: Bassem Youssef: Egypt's Jon Stewart", + 'description': "

Bassem Youssef joins executive producer Steve Bodow and senior producer Sara Taksler for a conversation about how The Daily Show inspired Bassem to create Al-Bernameg, his massively popular (and now banned) Egyptian news satire program. Sara discusses her soon-to-be-released documentary, Tickling Giants, which chronicles how Bassem and his staff risked their safety every day to tell jokes.

", + }, + }] def _real_extract(self, url): if url.startswith('//'): -- 2.22.2