mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-10 03:41:55 +08:00
[sxyprn] Add new extractor (closes #21645)
This commit is contained in:
parent
f9549b30f8
commit
a62b41a515
@ -1472,7 +1472,7 @@ from .younow import (
|
|||||||
YouNowMomentIE,
|
YouNowMomentIE,
|
||||||
)
|
)
|
||||||
from .youporn import YouPornIE
|
from .youporn import YouPornIE
|
||||||
from .yourporn import YourPornIE
|
from .sxyprn import SxyPrnIE
|
||||||
from .yourupload import YourUploadIE
|
from .yourupload import YourUploadIE
|
||||||
from .youtube import (
|
from .youtube import (
|
||||||
YoutubeIE,
|
YoutubeIE,
|
||||||
|
@ -6,10 +6,10 @@ from ..utils import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class YourPornIE(InfoExtractor):
|
class SxyPrnIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?(?:yourporn\.sexy|sxyprn\.com)/post/(?P<id>[^/?#&.]+)'
|
_VALID_URL = r'https?://(?:www\.)?sxyprn\.com/post/(?P<id>[^/?#&.]+)'
|
||||||
_TESTS = [{
|
_TEST = {
|
||||||
'url': 'https://yourporn.sexy/post/57ffcb2e1179b.html',
|
'url': 'https://sxyprn.com/post/57ffcb2e1179b.html',
|
||||||
'md5': '6f8682b6464033d87acaa7a8ff0c092e',
|
'md5': '6f8682b6464033d87acaa7a8ff0c092e',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '57ffcb2e1179b',
|
'id': '57ffcb2e1179b',
|
||||||
@ -21,11 +21,8 @@ class YourPornIE(InfoExtractor):
|
|||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
},
|
}
|
||||||
}, {
|
}
|
||||||
'url': 'https://sxyprn.com/post/57ffcb2e1179b.html',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
@ -35,7 +32,7 @@ class YourPornIE(InfoExtractor):
|
|||||||
url_parts = self._parse_json(self._search_regex(
|
url_parts = self._parse_json(self._search_regex(
|
||||||
r'data-vnfo=(["\'])(?P<data>{.+?})\1', webpage, 'data info', group='data'), video_id)[video_id].split("/")
|
r'data-vnfo=(["\'])(?P<data>{.+?})\1', webpage, 'data info', group='data'), video_id)[video_id].split("/")
|
||||||
|
|
||||||
aid = self._search_regex(r'data-aid=\'([a-z0-9]+)\'', webpage, 'aid')
|
aid = self._search_regex(r'data-aid=\'(.*?)\'', webpage, 'aid')
|
||||||
|
|
||||||
video_url = 'https://' + url_parts[2] + '.trafficdeposit.com/video/' + url_parts[3] + '/' + url_parts[
|
video_url = 'https://' + url_parts[2] + '.trafficdeposit.com/video/' + url_parts[3] + '/' + url_parts[
|
||||||
4] + '/' + url_parts[5] + '/' + aid + '/' + video_id + '.mp4'
|
4] + '/' + url_parts[5] + '/' + aid + '/' + video_id + '.mp4'
|
Loading…
x
Reference in New Issue
Block a user