import itertools import json import re from .common import InfoExtractor from ..utils import ( ExtractorError, extract_attributes, float_or_none, int_or_none, mimetype2ext, srt_subtitles_timecode, try_get, url_or_none, urlencode_postdata, urljoin, ) from ..utils.traversal import find_elements, require, traverse_obj class LinkedInBaseIE(InfoExtractor): _NETRC_MACHINE = 'linkedin' _logged_in = False def _perform_login(self, username, password): if self._logged_in: return login_page = self._download_webpage( self._LOGIN_URL, None, 'Downloading login page') action_url = urljoin(self._LOGIN_URL, self._search_regex( r'