projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ndr] Replace 404 video test
[youtube-dl]
/
youtube_dl
/
extractor
/
daum.py
diff --git
a/youtube_dl/extractor/daum.py
b/youtube_dl/extractor/daum.py
index 3d1dcb793627cb2d642c974f689c130faffe9ff1..4876ecb4812710e2509eec8fc19f00dac60d2fde 100644
(file)
--- a/
youtube_dl/extractor/daum.py
+++ b/
youtube_dl/extractor/daum.py
@@
-9,7
+9,7
@@
from ..utils import (
class DaumIE(InfoExtractor):
class DaumIE(InfoExtractor):
- _VALID_URL = r'https?://tvpot\.daum\.net/.*?clipid=(?P<id>\d+)'
+ _VALID_URL = r'https?://
(?:m\.)?
tvpot\.daum\.net/.*?clipid=(?P<id>\d+)'
IE_NAME = u'daum.net'
_TEST = {
IE_NAME = u'daum.net'
_TEST = {
@@
-28,7
+28,8
@@
class DaumIE(InfoExtractor):
video_id = mobj.group(1)
canonical_url = 'http://tvpot.daum.net/v/%s' % video_id
webpage = self._download_webpage(canonical_url, video_id)
video_id = mobj.group(1)
canonical_url = 'http://tvpot.daum.net/v/%s' % video_id
webpage = self._download_webpage(canonical_url, video_id)
- full_id = self._search_regex(r'<link rel="video_src" href=".+?vid=(.+?)"',
+ full_id = self._search_regex(
+ r'<iframe src="http://videofarm.daum.net/controller/video/viewer/Video.html\?.*?vid=(.+?)[&"]',
webpage, u'full id')
query = compat_urllib_parse.urlencode({'vid': full_id})
info = self._download_xml(
webpage, u'full id')
query = compat_urllib_parse.urlencode({'vid': full_id})
info = self._download_xml(
@@
-56,7
+57,7
@@
class DaumIE(InfoExtractor):
'format_id': profile,
})
'format_id': profile,
})
-
info =
{
+
return
{
'id': video_id,
'title': info.find('TITLE').text,
'formats': formats,
'id': video_id,
'title': info.find('TITLE').text,
'formats': formats,
@@
-65,6
+66,3
@@
class DaumIE(InfoExtractor):
'duration': int(info.find('DURATION').text),
'upload_date': info.find('REGDTTM').text[:8],
}
'duration': int(info.find('DURATION').text),
'upload_date': info.find('REGDTTM').text[:8],
}
- # TODO: Remove when #980 has been merged
- info.update(formats[-1])
- return info