def configure_video(self, upload_id, video, thumbnail, caption=''): clipInfo = get_video_info(video) self.upload_photo(photo=thumbnail, caption=caption, upload_id=upload_id) data = self.json_data({ 'upload_id': upload_id, 'source_type': 3, 'poster_frame_index': 0, 'length': 0.00, 'audio_muted': False, 'filter_type': 0, 'video_result': 'deprecated', 'clips': { 'length': clipInfo['duration'], 'source_type': '3', 'camera_position': 'back', }, 'extra': { 'source_width': clipInfo['width'], 'source_height': clipInfo['height'], }, 'device': self.device_settings, 'caption': caption, }) return self.send_request('media/configure/?video=1', data)