mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-18 11:30:11 +09:00
[torrins] cleanup
This commit is contained in:
parent
bc7d79b933
commit
5da4714716
@ -4,21 +4,10 @@ import re
|
|||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..compat import (
|
from ..compat import (
|
||||||
compat_HTTPError,
|
|
||||||
compat_kwargs,
|
compat_kwargs,
|
||||||
compat_str,
|
|
||||||
compat_urllib_request,
|
|
||||||
compat_urlparse,
|
|
||||||
)
|
)
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
determine_ext,
|
|
||||||
extract_attributes,
|
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
float_or_none,
|
|
||||||
int_or_none,
|
|
||||||
js_to_json,
|
|
||||||
sanitized_Request,
|
|
||||||
unescapeHTML,
|
|
||||||
urlencode_postdata,
|
urlencode_postdata,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -78,7 +67,7 @@ class TorrinsIE(InfoExtractor):
|
|||||||
if username is None:
|
if username is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
login_popup = self._download_webpage(
|
self._download_webpage(
|
||||||
self._LOGIN_URL, None, 'Downloading login popup')
|
self._LOGIN_URL, None, 'Downloading login popup')
|
||||||
|
|
||||||
def is_logged(reason):
|
def is_logged(reason):
|
||||||
@ -92,8 +81,6 @@ class TorrinsIE(InfoExtractor):
|
|||||||
if is_logged('Checking if already logged in'):
|
if is_logged('Checking if already logged in'):
|
||||||
return
|
return
|
||||||
|
|
||||||
#login_form = self._form_hidden_inputs('login-form', login_popup)
|
|
||||||
|
|
||||||
login_form = {
|
login_form = {
|
||||||
'email': username,
|
'email': username,
|
||||||
'password': password,
|
'password': password,
|
||||||
@ -122,7 +109,7 @@ class TorrinsIE(InfoExtractor):
|
|||||||
|
|
||||||
title = self._og_search_title(webpage)
|
title = self._og_search_title(webpage)
|
||||||
|
|
||||||
video_json = self._html_search_regex(r"<div id=\"video\" idata='(.+?)'", webpage, u'video formats')
|
video_json = self._html_search_regex(r"<div id=\"video\" idata='(.+?)'", webpage, 'video formats')
|
||||||
|
|
||||||
video_json = self._parse_json(video_json, course_id)
|
video_json = self._parse_json(video_json, course_id)
|
||||||
|
|
||||||
@ -150,7 +137,6 @@ class TorrinsIE(InfoExtractor):
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
|
Loading…
Reference in New Issue
Block a user