mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-06-16 08:25:33 +00:00
[ie/odnoklassniki] Detect and raise when login is required (#13361)
Closes #13360 Authored by: bashonly
This commit is contained in:
parent
85c8a405e3
commit
148a1eb4c5
@ -273,6 +273,8 @@ class OdnoklassnikiIE(InfoExtractor):
|
|||||||
return self._extract_desktop(smuggle_url(url, {'referrer': 'https://boosty.to'}))
|
return self._extract_desktop(smuggle_url(url, {'referrer': 'https://boosty.to'}))
|
||||||
elif error:
|
elif error:
|
||||||
raise ExtractorError(error, expected=True)
|
raise ExtractorError(error, expected=True)
|
||||||
|
elif '>Access to this video is restricted</div>' in webpage:
|
||||||
|
self.raise_login_required()
|
||||||
|
|
||||||
player = self._parse_json(
|
player = self._parse_json(
|
||||||
unescapeHTML(self._search_regex(
|
unescapeHTML(self._search_regex(
|
||||||
@ -429,7 +431,7 @@ class OdnoklassnikiIE(InfoExtractor):
|
|||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
webpage = self._download_webpage(
|
webpage = self._download_webpage(
|
||||||
f'http://m.ok.ru/video/{video_id}', video_id,
|
f'https://m.ok.ru/video/{video_id}', video_id,
|
||||||
note='Downloading mobile webpage')
|
note='Downloading mobile webpage')
|
||||||
|
|
||||||
error = self._search_regex(
|
error = self._search_regex(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user