projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1bb2fc9
)
[pornhd] Simplify
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 16 Dec 2013 04:10:42 +0000
(
05:10
+0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 16 Dec 2013 04:10:42 +0000
(
05:10
+0100)
youtube_dl/extractor/pornhd.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/pornhd.py
b/youtube_dl/extractor/pornhd.py
index c56740b8a927f7a8955a10b61eec3a9725a222b3..71abd5013bf272ffbb2812a87a6838fd3aeedd7e 100644
(file)
--- a/
youtube_dl/extractor/pornhd.py
+++ b/
youtube_dl/extractor/pornhd.py
@@
-3,12
+3,13
@@
import re
from .common import InfoExtractor
from ..utils import compat_urllib_parse
from .common import InfoExtractor
from ..utils import compat_urllib_parse
+
class PornHdIE(InfoExtractor):
_VALID_URL = r'(?:http://)?(?:www\.)?pornhd\.com/videos/(?P<video_id>[0-9]+)/(?P<video_title>.+)'
_TEST = {
class PornHdIE(InfoExtractor):
_VALID_URL = r'(?:http://)?(?:www\.)?pornhd\.com/videos/(?P<video_id>[0-9]+)/(?P<video_title>.+)'
_TEST = {
- u'id': u'1962',
u'url': u'http://www.pornhd.com/videos/1962/sierra-day-gets-his-cum-all-over-herself-hd-porn-video',
u'url': u'http://www.pornhd.com/videos/1962/sierra-day-gets-his-cum-all-over-herself-hd-porn-video',
- u'md5': u'4fe06e5108e8b524c35896f4c54c7155',
+ u'file': u'1962.flv',
+ u'md5': u'35272469887dca97abd30abecc6cdf75',
u'info_dict': {
u"title": u"sierra-day-gets-his-cum-all-over-herself-hd-porn-video",
u"age_limit": 18,
u'info_dict': {
u"title": u"sierra-day-gets-his-cum-all-over-herself-hd-porn-video",
u"age_limit": 18,
@@
-20,23
+21,18
@@
class PornHdIE(InfoExtractor):
video_id = mobj.group('video_id')
video_title = mobj.group('video_title')
video_id = mobj.group('video_id')
video_title = mobj.group('video_title')
- video_extension = 'flv'
webpage = self._download_webpage(url, video_id)
webpage = self._download_webpage(url, video_id)
-
- self.report_extraction(video_id)
-
video_url = self._html_search_regex(
r'&hd=(http.+?)&', webpage, u'video URL')
video_url = compat_urllib_parse.unquote(video_url)
video_url = self._html_search_regex(
r'&hd=(http.+?)&', webpage, u'video URL')
video_url = compat_urllib_parse.unquote(video_url)
-
age_limit = 18
return {
age_limit = 18
return {
- 'id':
video_id,
- 'url':
video_url,
- 'ext':
video_extension
,
- 'title':
video_title,
+ 'id': video_id,
+ 'url': video_url,
+ 'ext':
'flv'
,
+ 'title': video_title,
'age_limit': age_limit,
}
'age_limit': age_limit,
}