mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-03 16:45:17 +00:00
[compat] Remove more functions
Removing any more will require changes to a large number of extractors
This commit is contained in:
@ -1,16 +1,12 @@
|
||||
import re
|
||||
import urllib.request
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..compat import (
|
||||
compat_HTTPError,
|
||||
compat_str,
|
||||
compat_urllib_request,
|
||||
compat_urlparse,
|
||||
)
|
||||
from ..compat import compat_HTTPError, compat_str, compat_urlparse
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
determine_ext,
|
||||
extract_attributes,
|
||||
ExtractorError,
|
||||
float_or_none,
|
||||
int_or_none,
|
||||
js_to_json,
|
||||
@ -155,7 +151,7 @@ class UdemyIE(InfoExtractor):
|
||||
headers['X-Udemy-Bearer-Token'] = cookie.value
|
||||
headers['X-Udemy-Authorization'] = 'Bearer %s' % cookie.value
|
||||
|
||||
if isinstance(url_or_request, compat_urllib_request.Request):
|
||||
if isinstance(url_or_request, urllib.request.Request):
|
||||
for header, value in headers.items():
|
||||
url_or_request.add_header(header, value)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user