Ejemplo n.º 1
0
    def _verify_video_password(self, url, video_id, webpage):
        password = self._downloader.params.get('videopassword')
        if password is None:
            raise ExtractorError(
                'This video is protected by a password, use the --video-password option',
                expected=True)
        meetId = self._search_regex(
            r'<input[^>]+?id="meetId" value="([^\"]+)"', webpage, 'meetId')
        data = urlencode_postdata({
            'id': meetId,
            'passwd': password,
            'action': "viewdetailedpage",
            'recaptcha': ""
        })
        validation_url = url.split(
            "zoom.us")[0] + "zoom.us/rec/validate_meet_passwd"
        validation_response = self._download_json(
            validation_url,
            video_id,
            note='Validating Password...',
            errnote='Wrong password?',
            data=data)

        if validation_response['errorCode'] != 0:
            raise ExtractorError(
                'Login failed, %s said: %r' %
                (self.IE_NAME, validation_response['errorMessage']))
Ejemplo n.º 2
0
 def test_urlencode_postdata(self):
     data = urlencode_postdata({
         'username': '******',
         'password': '******'
     })
     self.assertTrue(isinstance(data, bytes))
Ejemplo n.º 3
0
 def test_urlencode_postdata(self):
     data = urlencode_postdata({'username': '******', 'password': '******'})
     self.assertTrue(isinstance(data, bytes))
Ejemplo n.º 4
0
 def test_urlencode_postdata(self):
     data = urlencode_postdata({"username": "******", "password": "******"})
     self.assertTrue(isinstance(data, bytes))