mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-10 20:47:21 +08:00
Handle paid video only if formats is missing.
This commit is contained in:
parent
341cc7125b
commit
0e3e9bd435
@ -158,10 +158,6 @@ class OdnoklassnikiIE(InfoExtractor):
|
||||
video_id, 'Downloading metadata JSON',
|
||||
data=urlencode_postdata(data))
|
||||
|
||||
paymentInfo = metadata.get('paymentInfo')
|
||||
if paymentInfo:
|
||||
raise ExtractorError('This is Paid video. you need to subscribe in order to watch it', expected=True)
|
||||
|
||||
movie = metadata['movie']
|
||||
|
||||
# Some embedded videos may not contain title in movie dict (e.g.
|
||||
@ -255,5 +251,10 @@ class OdnoklassnikiIE(InfoExtractor):
|
||||
|
||||
self._sort_formats(formats)
|
||||
|
||||
if not formats:
|
||||
payment_info = metadata.get('paymentInfo')
|
||||
if payment_info:
|
||||
raise ExtractorError('This video is paid, subscribe to download it', expected=True)
|
||||
|
||||
info['formats'] = formats
|
||||
return info
|
||||
|
Loading…
x
Reference in New Issue
Block a user