aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/comedycentral.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-12-03 14:58:24 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-12-03 14:58:24 +0100
commit84db81815af6787d91188ca065cc9ced4d83a4ca (patch)
tree90c97d14464655d9fa2183af2ef02f6782c22316 /youtube_dl/extractor/comedycentral.py
parentfb7abb31af93a2a1d84ba17beb0f389dd09eafdb (diff)
downloadyoutube-dl-84db81815af6787d91188ca065cc9ced4d83a4ca.tar.xz
Move common code for extractors based in MTV services to a new base class
Removes the duplication of the thumbnail extraction code (only MTVIE needs to override it)
Diffstat (limited to 'youtube_dl/extractor/comedycentral.py')
-rw-r--r--youtube_dl/extractor/comedycentral.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/youtube_dl/extractor/comedycentral.py b/youtube_dl/extractor/comedycentral.py
index 41ef9ad47..53579aa27 100644
--- a/youtube_dl/extractor/comedycentral.py
+++ b/youtube_dl/extractor/comedycentral.py
@@ -1,7 +1,7 @@
import re
from .common import InfoExtractor
-from .mtv import MTVIE, _media_xml_tag
+from .mtv import MTVServicesInfoExtractor
from ..utils import (
compat_str,
compat_urllib_parse,
@@ -11,7 +11,7 @@ from ..utils import (
)
-class ComedyCentralIE(MTVIE):
+class ComedyCentralIE(MTVServicesInfoExtractor):
_VALID_URL = r'http://www.comedycentral.com/(video-clips|episodes|cc-studios)/(?P<title>.*)'
_FEED_URL = u'http://comedycentral.com/feeds/mrss/'
@@ -25,12 +25,6 @@ class ComedyCentralIE(MTVIE):
u'description': u'After a certain point, breastfeeding becomes c**kblocking.',
},
}
- # Overwrite MTVIE properties we don't want
- _TESTS = []
-
- def _get_thumbnail_url(self, uri, itemdoc):
- search_path = '%s/%s' % (_media_xml_tag('group'), _media_xml_tag('thumbnail'))
- return itemdoc.find(search_path).attrib['url']
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)