mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-08-20 03:18:30 +00:00
fix format issues
This commit is contained in:
parent
00a550ddf8
commit
3cab0b7db7
@ -1,5 +1,5 @@
|
|||||||
from yt_dlp.utils._utils import ExtractorError
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
from yt_dlp.utils._utils import ExtractorError
|
||||||
|
|
||||||
|
|
||||||
class MyFreeCamsIE(InfoExtractor):
|
class MyFreeCamsIE(InfoExtractor):
|
||||||
@ -12,12 +12,12 @@ class MyFreeCamsIE(InfoExtractor):
|
|||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'live_status': 'is_live',
|
'live_status': 'is_live',
|
||||||
'age_limit': 18,
|
'age_limit': 18,
|
||||||
'thumbnail': 're:https://img.mfcimg.com/photos2/121/12172602/avatar.300x300.jpg\\?nc=\\d+'
|
'thumbnail': 're:https://img.mfcimg.com/photos2/121/12172602/avatar.300x300.jpg\\?nc=\\d+',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
'skip': 'Model offline'
|
'skip': 'Model offline',
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://share.myfreecams.com/BUSTY_EMA',
|
'url': 'https://share.myfreecams.com/BUSTY_EMA',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
@ -26,12 +26,12 @@ class MyFreeCamsIE(InfoExtractor):
|
|||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'live_status': 'is_live',
|
'live_status': 'is_live',
|
||||||
'age_limit': 18,
|
'age_limit': 18,
|
||||||
'thumbnail': 're:https://img.mfcimg.com/photos2/295/29538300/avatar.300x300.jpg\\?nc=\\d+'
|
'thumbnail': 're:https://img.mfcimg.com/photos2/295/29538300/avatar.300x300.jpg\\?nc=\\d+',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
'skip': 'Model offline'
|
'skip': 'Model offline',
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://www.myfreecams.com/#notbeckyhecky',
|
'url': 'https://www.myfreecams.com/#notbeckyhecky',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
@ -40,33 +40,33 @@ class MyFreeCamsIE(InfoExtractor):
|
|||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'is_live': True,
|
'is_live': True,
|
||||||
'age_limit': 18,
|
'age_limit': 18,
|
||||||
'thumbnail': 're:https://img.mfcimg.com/photos2/243/24308977/avatar.300x300.jpg\\?nc=\\d+'
|
'thumbnail': 're:https://img.mfcimg.com/photos2/243/24308977/avatar.300x300.jpg\\?nc=\\d+',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
'skip': 'Model offline'
|
'skip': 'Model offline',
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def get_required_params(self, webpage):
|
def get_required_params(self, webpage):
|
||||||
sid = self._search_regex(
|
sid = self._search_regex(
|
||||||
[r'data-campreview-sid=["\'](\d+)["\']', r'data-cam-preview-server-id-value=["\'](\d+)["\']'],
|
[r'data-campreview-sid=["\'](\d+)["\']', r'data-cam-preview-server-id-value=["\'](\d+)["\']'],
|
||||||
webpage, 'sid'
|
webpage, 'sid',
|
||||||
)
|
)
|
||||||
|
|
||||||
mid = self._search_regex(
|
mid = self._search_regex(
|
||||||
[r'data-campreview-mid=["\'](\d+)["\']', r'data-cam-preview-model-id-value=["\'](\d+)["\']'],
|
[r'data-campreview-mid=["\'](\d+)["\']', r'data-cam-preview-model-id-value=["\'](\d+)["\']'],
|
||||||
webpage, 'mid'
|
webpage, 'mid',
|
||||||
)
|
)
|
||||||
|
|
||||||
webrtc = self._search_regex(
|
webrtc = self._search_regex(
|
||||||
[r'data-is-webrtc=["\']([^"\']+)["\']', r'data-cam-preview-is-webrtc-value=["\']([^"\']+)["\']'],
|
[r'data-is-webrtc=["\']([^"\']+)["\']', r'data-cam-preview-is-webrtc-value=["\']([^"\']+)["\']'],
|
||||||
webpage, 'webrtc', default='false'
|
webpage, 'webrtc', default='false',
|
||||||
)
|
)
|
||||||
|
|
||||||
snap_url = self._search_regex(
|
snap_url = self._search_regex(
|
||||||
r'data-cam-preview-snap-url-value=["\']([^"\']+)["\']',
|
r'data-cam-preview-snap-url-value=["\']([^"\']+)["\']',
|
||||||
webpage, 'snap_url'
|
webpage, 'snap_url',
|
||||||
)
|
)
|
||||||
|
|
||||||
webrtc = 'true' if 'mfc_a_' in snap_url else 'false'
|
webrtc = 'true' if 'mfc_a_' in snap_url else 'false'
|
||||||
@ -74,7 +74,7 @@ def get_required_params(self, webpage):
|
|||||||
return {
|
return {
|
||||||
'sid': sid,
|
'sid': sid,
|
||||||
'mid': str(int(mid) + 100_000_000),
|
'mid': str(int(mid) + 100_000_000),
|
||||||
'a': 'a_' if webrtc == 'true' else ''
|
'a': 'a_' if webrtc == 'true' else '',
|
||||||
}
|
}
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
Loading…
Reference in New Issue
Block a user