mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-09 02:13:47 +00:00
[nebula] Use PATCHRequest instead of Request
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
parent
c091eb8e0c
commit
7b264c19ef
@ -3,7 +3,7 @@ import json
|
|||||||
|
|
||||||
from .art19 import Art19IE
|
from .art19 import Art19IE
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..networking.common import Request
|
from ..networking import PATCHRequest
|
||||||
from ..networking.exceptions import HTTPError
|
from ..networking.exceptions import HTTPError
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
@ -113,14 +113,11 @@ class NebulaBaseIE(InfoExtractor):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def _mark_watched(self, content_id, slug):
|
def _mark_watched(self, content_id, slug):
|
||||||
data = {'completed': True}
|
|
||||||
req = Request(
|
|
||||||
f'https://content.api.nebula.app/{content_id.split(":")[0]}s/{content_id}/progress/',
|
|
||||||
method='PATCH')
|
|
||||||
self._call_api(
|
self._call_api(
|
||||||
req, slug,
|
PATCHRequest(f'https://content.api.nebula.app/{content_id.split(":")[0]}s/{content_id}/progress/'),
|
||||||
data=json.dumps(data).encode('utf8'), headers={'content-type': 'application/json'},
|
slug, 'Marking watched', 'Unable to mark watched', fatal=False,
|
||||||
fatal=False, note='Marking watched', errnote='Unable to mark watched')
|
data=json.dumps({'completed': True}).encode(),
|
||||||
|
headers={'content-type': 'application/json'})
|
||||||
|
|
||||||
|
|
||||||
class NebulaIE(NebulaBaseIE):
|
class NebulaIE(NebulaBaseIE):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user