Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ciscolive] - Update _VALID_URL patterns (Fixes issue #20320) #20351

Merged
merged 4 commits into from Mar 17, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 18 additions & 4 deletions youtube_dl/extractor/ciscolive.py
Expand Up @@ -65,8 +65,8 @@ def _parse_rf_item(self, rf_item):


class CiscoLiveSessionIE(CiscoLiveBaseIE):
_VALID_URL = r'https?://ciscolive\.cisco\.com/on-demand-library/\??[^#]*#/session/(?P<id>[^/?&]+)'
_TEST = {
_VALID_URL = r'https?://(?:www\.)?ciscolive(?:\.cisco)?\.com/[^#]*#/session/(?P<id>[^/?&]+)'
_TESTS = [{
'url': 'https://ciscolive.cisco.com/on-demand-library/?#/session/1423353499155001FoSs',
'md5': 'c98acf395ed9c9f766941c70f5352e22',
'info_dict': {
Expand All @@ -79,7 +79,20 @@ class CiscoLiveSessionIE(CiscoLiveBaseIE):
'uploader_id': '5647924234001',
'location': '16B Mezz.',
},
}
}, {
'url': 'https://www.ciscolive.com/global/on-demand-library.html?search.event=ciscoliveemea2019#/session/15361595531500013WOU',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only_matching.

'md5': '8e39c9ae3b56587f278710ce756b14ad',
'info_dict': {
'id': '5996480053001',
'ext': 'mp4',
'title': 'A Closer Look: Monitoring Network Policies in ACI Using Correlated, Real Time Application Performance Visibility from AppDynamics',
'description': 'md5:59235fa58d7015cba08cb67e3767dc7c',
'timestamp': 1548873245,
'upload_date': '20190130',
'uploader_id': '5647924234001',
'location': 'Hall 6 - The Hub, DevNet Classroom 1',
},
}]

def _real_extract(self, url):
rf_id = self._match_id(url)
Expand All @@ -88,7 +101,7 @@ def _real_extract(self, url):


class CiscoLiveSearchIE(CiscoLiveBaseIE):
_VALID_URL = r'https?://ciscolive\.cisco\.com/on-demand-library/'
_VALID_URL = r'https?://(?:www\.)?ciscolive(?:\.cisco)?\.com/[^?]*\?search'
austind marked this conversation as resolved.
Show resolved Hide resolved
austind marked this conversation as resolved.
Show resolved Hide resolved
_TESTS = [{
'url': 'https://ciscolive.cisco.com/on-demand-library/?search.event=ciscoliveus2018&search.technicallevel=scpsSkillLevel_aintroductory&search.focus=scpsSessionFocus_designAndDeployment#/',
'info_dict': {
Expand Down Expand Up @@ -140,3 +153,4 @@ def _real_extract(self, url):
query['type'] = 'session'
return self.playlist_result(
self._entries(query, url), playlist_title='Search query')

austind marked this conversation as resolved.
Show resolved Hide resolved