# coding: utf-8 from __future__ import unicode_literals from itertools import zip_longest import re from .common import InfoExtractor from ..utils import ( clean_html, extract_attributes, ExtractorError, float_or_none, get_element_by_class, int_or_none, srt_subtitles_timecode, strip_or_none, mimetype2ext, try_get, urlencode_postdata, urljoin, ) 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'