mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 14:37:21 +00:00
add check for login required
Authored by: bashonly
This commit is contained in:
parent
2309b88c1a
commit
bf0cf9995d
|
@ -32,6 +32,11 @@ def _perform_login(self, username, password):
|
|||
}).encode())
|
||||
self._API_HEADERS['Authorization'] = f'{response["token_type"]} {response["access_token"]}'
|
||||
|
||||
def _real_initialize(self):
|
||||
if not self._API_HEADERS.get('Authorization'):
|
||||
self.raise_login_required(
|
||||
'This content is only available with purchase', method='password')
|
||||
|
||||
def _entries(self, data, course_id):
|
||||
course_list = []
|
||||
for section in data['data']['sections']:
|
||||
|
|
Loading…
Reference in a new issue