mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-21 13:54:22 -07:00
Use urlencode_postdata across the codebase
This commit is contained in:
parent
15707c7e02
commit
6e6bc8dae5
36 changed files with 90 additions and 94 deletions
|
@ -5,11 +5,11 @@ import json
|
|||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..compat import compat_urllib_parse_urlencode
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
int_or_none,
|
||||
sanitized_Request,
|
||||
urlencode_postdata,
|
||||
)
|
||||
|
||||
|
||||
|
@ -77,7 +77,7 @@ class MoeVideoIE(InfoExtractor):
|
|||
],
|
||||
]
|
||||
r_json = json.dumps(r)
|
||||
post = compat_urllib_parse_urlencode({'r': r_json})
|
||||
post = urlencode_postdata({'r': r_json})
|
||||
req = sanitized_Request(self._API_URL, post)
|
||||
req.add_header('Content-type', 'application/x-www-form-urlencoded')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue