Compare commits

..

No commits in common. "d660f1ed63ef5e97d88a43f3efe1bea12f03b67b" and "02ef914317a699b5712235e26dc9f4973df9f5e1" have entirely different histories.

2 changed files with 6 additions and 7 deletions

1
.gitignore vendored
View File

@ -47,7 +47,6 @@ cookies
*.png
*.sbv
*.srt
*.ssa
*.swf
*.swp
*.tt

View File

@ -3,7 +3,6 @@ import binascii
import json
import os
import random
import time
from .common import InfoExtractor
from ..aes import aes_cbc_decrypt_bytes, unpad_pkcs7
@ -18,7 +17,6 @@ from ..utils import (
int_or_none,
intlist_to_bytes,
long_to_bytes,
parse_iso8601,
pkcs1pad,
strip_or_none,
str_or_none,
@ -184,13 +182,15 @@ Format: Marked,Start,End,Style,Name,MarginL,MarginR,MarginV,Effect,Text'''
'Downloading player config JSON metadata',
headers=self._HEADERS)['player']
options = player['options']
video = options['video']
startDate = video.get('startDate')
currentDate = video.get('currentDate')
if startDate and currentDate and startDate > currentDate:
raise ExtractorError(f'This video is not available yet. Release date: {startDate}', expected=True)
user = options['user']
if not user.get('hasAccess'):
start_date = traverse_obj(options, ('video', 'startDate', {str}))
if (parse_iso8601(start_date) or 0) > time.time():
raise ExtractorError(f'This video is not available yet. Release date: {start_date}', expected=True)
self.raise_login_required(msg='This video requires a subscription', method='password')
self.raise_login_required('This video requires a subscription', method='password')
token = self._download_json(
user.get('refreshTokenUrl') or (self._PLAYER_BASE_URL + 'refresh/token'),