mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-09 22:47:20 +08:00
[yourporn] Fix video_url with epoch and set filename extension to 'mp4'
This commit is contained in:
parent
6ebbe7e29b
commit
fbfc2abd50
@ -1,5 +1,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import time
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
parse_duration
|
parse_duration
|
||||||
@ -39,9 +41,11 @@ class YourPornIE(InfoExtractor):
|
|||||||
aid = self._search_regex(r'data-aid=["\'](?P<aid>.+?)["\']',
|
aid = self._search_regex(r'data-aid=["\'](?P<aid>.+?)["\']',
|
||||||
webpage, 'aid')
|
webpage, 'aid')
|
||||||
|
|
||||||
video_url = 'https://' + url_parts[2] + '.trafficdeposit.com/video/'\
|
epoch = int(time.time() + 3600)
|
||||||
+ url_parts[3] + '/' + url_parts[4] + '/' + url_parts[5]\
|
|
||||||
+ '/' + aid + '/' + video_id + '.mp4'
|
video_url = 'https://' + url_parts[2] + '.trafficdeposit.com/vidi/' \
|
||||||
|
+ url_parts[3] + '/' + url_parts[4] + '/' + str(epoch) \
|
||||||
|
+ '/' + aid + '/' + video_id + '.vid'
|
||||||
|
|
||||||
title = (self._search_regex(
|
title = (self._search_regex(
|
||||||
r'<[^>]+\bclass=["\']PostEditTA[^>]+>([^<]+)', webpage, 'title',
|
r'<[^>]+\bclass=["\']PostEditTA[^>]+>([^<]+)', webpage, 'title',
|
||||||
@ -58,4 +62,5 @@ class YourPornIE(InfoExtractor):
|
|||||||
'thumbnail': thumbnail,
|
'thumbnail': thumbnail,
|
||||||
'duration': duration,
|
'duration': duration,
|
||||||
'age_limit': 18,
|
'age_limit': 18,
|
||||||
|
'ext': 'mp4',
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user