aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/extractor/ted.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-01-17 03:52:17 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-01-17 03:52:17 +0100
commitf853f8594dfe9785e6cd20067103627d50686eb8 (patch)
treee978f262f112cc988d3dd743fb1813c58318b7e1 /youtube_dl/extractor/ted.py
parent8307aa73fb76bb68cd961400729a799c47105244 (diff)
downloadyoutube-dl-f853f8594dfe9785e6cd20067103627d50686eb8.zip
youtube-dl-f853f8594dfe9785e6cd20067103627d50686eb8.tar.gz
youtube-dl-f853f8594dfe9785e6cd20067103627d50686eb8.tar.bz2
[ted] Use unicode_literals
Diffstat (limited to 'youtube_dl/extractor/ted.py')
-rw-r--r--youtube_dl/extractor/ted.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/youtube_dl/extractor/ted.py b/youtube_dl/extractor/ted.py
index 4bca62b..4a581c9 100644
--- a/youtube_dl/extractor/ted.py
+++ b/youtube_dl/extractor/ted.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
import json
import re
@@ -7,6 +9,7 @@ from ..utils import (
RegexNotFoundError,
)
+
class TEDIE(SubtitlesInfoExtractor):
_VALID_URL=r'''http://www\.ted\.com/
(
@@ -18,12 +21,12 @@ class TEDIE(SubtitlesInfoExtractor):
/(?P<name>\w+) # Here goes the name and then ".html"
'''
_TEST = {
- u'url': u'http://www.ted.com/talks/dan_dennett_on_our_consciousness.html',
- u'file': u'102.mp4',
- u'md5': u'2d76ee1576672e0bd8f187513267adf6',
- u'info_dict': {
- u"description": u"md5:c6fa72e6eedbd938c9caf6b2702f5922",
- u"title": u"Dan Dennett: The illusion of consciousness"
+ 'url': 'http://www.ted.com/talks/dan_dennett_on_our_consciousness.html',
+ 'file': '102.mp4',
+ 'md5': '2d76ee1576672e0bd8f187513267adf6',
+ 'info_dict': {
+ "description": "md5:c6fa72e6eedbd938c9caf6b2702f5922",
+ "title": "Dan Dennett: The illusion of consciousness"
}
}
@@ -47,7 +50,7 @@ class TEDIE(SubtitlesInfoExtractor):
'''Returns the videos of the playlist'''
webpage = self._download_webpage(
- url, playlist_id, u'Downloading playlist webpage')
+ url, playlist_id, 'Downloading playlist webpage')
matches = re.finditer(
r'<p\s+class="talk-title[^"]*"><a\s+href="(?P<talk_url>/talks/[^"]+\.html)">[^<]*</a></p>',
webpage)