diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2023-03-10 17:27:43 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2023-03-10 17:27:43 +0530 |
commit | e6ab678e36c40ded0aae305bbb866cdab554d417 (patch) | |
tree | 1aabaf5e0c953d20f1d4f5682d024835718a3f51 | |
parent | ab1de9cb1e39cf421c2b7dc6756c6ff1955bb313 (diff) | |
download | hypervideo-pre-e6ab678e36c40ded0aae305bbb866cdab554d417.tar.lz hypervideo-pre-e6ab678e36c40ded0aae305bbb866cdab554d417.tar.xz hypervideo-pre-e6ab678e36c40ded0aae305bbb866cdab554d417.zip |
[extractor/hidive] Fix login
Fixes https://github.com/yt-dlp/yt-dlp/issues/6493#issuecomment-1462906556
-rw-r--r-- | yt_dlp/extractor/hidive.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/yt_dlp/extractor/hidive.py b/yt_dlp/extractor/hidive.py index 8a8749859..df6868df6 100644 --- a/yt_dlp/extractor/hidive.py +++ b/yt_dlp/extractor/hidive.py @@ -47,15 +47,16 @@ class HiDiveIE(InfoExtractor): login_webpage = self._download_webpage( self._LOGIN_URL, None, 'Logging in', data=urlencode_postdata(data)) # If the user has multiple profiles on their account, select one. For now pick the first profile. - profile_id = self._search_regex(r'<button [^>]+?data-profile-id="(\w+)"', login_webpage, 'profile_id') + profile_id = self._search_regex( + r'<button [^>]+?data-profile-id="(\w+)"', login_webpage, 'profile id', default=None) if profile_id is None: return # If only one profile, Hidive auto-selects it - profile_id_hash = self._search_regex(r'\<button [^>]+?data-hash="(\w+)"', login_webpage, 'profile_id_hash') self._request_webpage( 'https://www.hidive.com/ajax/chooseprofile', None, data=urlencode_postdata({ 'profileId': profile_id, - 'hash': profile_id_hash, + 'hash': self._search_regex( + r'\<button [^>]+?data-hash="(\w+)"', login_webpage, 'profile id hash'), 'returnUrl': '/dashboard' })) |