projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[youtube] Simplify the decryption process for the manifest urls and add a test (close...
[youtube-dl]
/
youtube_dl
/
extractor
/
infoq.py
diff --git
a/youtube_dl/extractor/infoq.py
b/youtube_dl/extractor/infoq.py
index 7c208b85d21d58fb47c1be5d2db16598c10d1757..ed32373a1be5e3a20a0f7a1ca04c2da091ee68b6 100644
(file)
--- a/
youtube_dl/extractor/infoq.py
+++ b/
youtube_dl/extractor/infoq.py
@@
-10,7
+10,7
@@
from ..utils import (
class InfoQIE(InfoExtractor):
class InfoQIE(InfoExtractor):
- _VALID_URL = r'
^(?:https?://)?(?:www\.)?infoq\.com/[^/]+/[^/]+
$'
+ _VALID_URL = r'
https?://(?:www\.)?infoq\.com/[^/]+/(?P<id>[^/]+)
$'
_TEST = {
"name": "InfoQ",
"url": "http://www.infoq.com/presentations/A-Few-of-My-Favorite-Python-Things",
_TEST = {
"name": "InfoQ",
"url": "http://www.infoq.com/presentations/A-Few-of-My-Favorite-Python-Things",
@@
-26,9
+26,9
@@
class InfoQIE(InfoExtractor):
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
+ video_id = mobj.group('id')
- webpage = self._download_webpage(url, video_id=url)
- self.report_extraction(url)
+ webpage = self._download_webpage(url, video_id)
# Extract video URL
encoded_id = self._search_regex(r"jsclassref ?= ?'([^']*)'", webpage, 'encoded id')
# Extract video URL
encoded_id = self._search_regex(r"jsclassref ?= ?'([^']*)'", webpage, 'encoded id')
@@
-50,6
+50,6
@@
class InfoQIE(InfoExtractor):
'id': video_id,
'url': video_url,
'title': video_title,
'id': video_id,
'url': video_url,
'title': video_title,
- 'ext': extension, # Extension is always(?) mp4, but seems to be flv
+ 'ext': extension,
# Extension is always(?) mp4, but seems to be flv
'description': video_description,
}
'description': video_description,
}