diff --git a/yt_dlp/extractor/linkedin.py b/yt_dlp/extractor/linkedin.py index 66e679762e..606d0b761b 100644 --- a/yt_dlp/extractor/linkedin.py +++ b/yt_dlp/extractor/linkedin.py @@ -274,7 +274,7 @@ class LinkedInLearningCourseIE(LinkedInLearningBaseIE): course_data.get('description')) -class LinkedInEventsIE(InfoExtractor): +class LinkedInEventsIE(LinkedInBaseIE): IE_NAME = 'linkedin:events' _VALID_URL = r'https?://(?:www\.)?linkedin\.com/events/(?P[\w-]+)' _TESTS = [{ @@ -307,6 +307,10 @@ class LinkedInEventsIE(InfoExtractor): }, }] + def _real_initialize(self): + if not self._get_cookies('https://www.linkedin.com/').get('li_at'): + self.raise_login_required() + def _real_extract(self, url): event_id = self._match_id(url) webpage = self._download_webpage(url, event_id)