aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/curiositystream.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-11-13 23:55:12 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-11-13 23:56:56 +0530
commitd0e6121adf4f82b266c82d7e632f7fe79f05096c (patch)
treed8f8cd9770d26563cb87da9f6827641c23ced577 /yt_dlp/extractor/curiositystream.py
parent9ac24e235ea9ef91c711c35b0f793d17ea284a54 (diff)
downloadhypervideo-pre-d0e6121adf4f82b266c82d7e632f7fe79f05096c.tar.lz
hypervideo-pre-d0e6121adf4f82b266c82d7e632f7fe79f05096c.tar.xz
hypervideo-pre-d0e6121adf4f82b266c82d7e632f7fe79f05096c.zip
[curiositystream] Fix login
Bug from 92775d8a40728fe045af000755f1c3eeffb2089d
Diffstat (limited to 'yt_dlp/extractor/curiositystream.py')
-rw-r--r--yt_dlp/extractor/curiositystream.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/yt_dlp/extractor/curiositystream.py b/yt_dlp/extractor/curiositystream.py
index 286a4c6af..485b6031f 100644
--- a/yt_dlp/extractor/curiositystream.py
+++ b/yt_dlp/extractor/curiositystream.py
@@ -15,7 +15,6 @@ from ..utils import (
class CuriosityStreamBaseIE(InfoExtractor):
_NETRC_MACHINE = 'curiositystream'
_auth_token = None
- _API_BASE_URL = 'https://api.curiositystream.com/v1/'
def _handle_errors(self, result):
error = result.get('error', {}).get('message')
@@ -39,7 +38,8 @@ class CuriosityStreamBaseIE(InfoExtractor):
if email is None:
return
result = self._download_json(
- self._API_BASE_URL + 'login', None, data=urlencode_postdata({
+ 'https://api.curiositystream.com/v1/login', None,
+ note='Logging in', data=urlencode_postdata({
'email': email,
'password': password,
}))
@@ -68,12 +68,14 @@ class CuriosityStreamIE(CuriosityStreamBaseIE):
},
}]
+ _API_BASE_URL = 'https://api.curiositystream.com/v1/media/'
+
def _real_extract(self, url):
video_id = self._match_id(url)
formats = []
for encoding_format in ('m3u8', 'mpd'):
- media = self._call_api('media/' + video_id, video_id, query={
+ media = self._call_api(video_id, video_id, query={
'encodingsNew': 'true',
'encodingsFormat': encoding_format,
})