mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-07 09:23:38 +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 .common import InfoExtractor
|
||||
from ..networking.common import Request
|
||||
from ..networking import PATCHRequest
|
||||
from ..networking.exceptions import HTTPError
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
@ -113,14 +113,11 @@ class NebulaBaseIE(InfoExtractor):
|
||||
}
|
||||
|
||||
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(
|
||||
req, slug,
|
||||
data=json.dumps(data).encode('utf8'), headers={'content-type': 'application/json'},
|
||||
fatal=False, note='Marking watched', errnote='Unable to mark watched')
|
||||
PATCHRequest(f'https://content.api.nebula.app/{content_id.split(":")[0]}s/{content_id}/progress/'),
|
||||
slug, 'Marking watched', 'Unable to mark watched', fatal=False,
|
||||
data=json.dumps({'completed': True}).encode(),
|
||||
headers={'content-type': 'application/json'})
|
||||
|
||||
|
||||
class NebulaIE(NebulaBaseIE):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user