1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-18 08:16:10 +00:00

[VXXX] Support "friend" site: mrgay.com

This commit is contained in:
tabjy 2022-10-02 06:41:08 -04:00
parent a6a1c149d6
commit f2398c0070
2 changed files with 43 additions and 0 deletions

View file

@ -675,6 +675,7 @@ from .metacritic import MetacriticIE
from .mgoon import MgoonIE
from .mgtv import MGTVIE
from .miaopai import MiaoPaiIE
from .mrgay import MrGayIE
from .microsoftvirtualacademy import (
MicrosoftVirtualAcademyIE,
MicrosoftVirtualAcademyCourseIE,

View file

@ -0,0 +1,42 @@
# coding: utf-8
from __future__ import unicode_literals
from .vxxx import VXXXIE
class MrGayIE(VXXXIE):
_VALID_URL = r'https?://mrgay\.com/video/(?P<id>\d+)'
_TESTS = [{
'url': 'https://mrgay.com/video/10169199/jpn-crossdresser-6/',
'md5': 'b2ff401f8a168007702f3f5cbecd7bc2',
'info_dict': {
'id': '10169199',
'ext': 'mp4',
'title': 'Jpn Crossdresser 6',
'display_id': 'jpn-crossdresser-6',
'thumbnail': 'https://tn.mrgay.com/media/tn/10169199_1.jpg',
'description': '',
'timestamp': 1651066888,
'upload_date': '20220427',
'duration': 834.0,
'categories': ['Amateur', 'Asian', 'Brunette', 'Crossdressing',
'Japanese', 'Webcam'],
}
}]
def _download_info_object(self, video_id):
return self._download_json(
'https://mrgay.com/api/json/video/86400/0/{}/{}.json'.format(
int(video_id) // 1000 * 1000,
video_id,
), video_id, headers={'Referer': 'https://mrgay.com'})['video']
def _download_format_object(self, video_id):
return self._download_json(
'https://mrgay.com/api/videofile.php?video_id={}'.format(video_id),
video_id,
headers={'Referer': 'https://mrgay.com'}
)
def _get_video_host(self):
return 'mrgay.com'