Update pluralsight.py

Regex it completely broken.  Pluralsight now changed both the order of their URL params, but also from WWW to APP subdomain.  Rewrote the regex making the sections optional to account for changing order but I am admittedly not the regex guru that some are, so by all means if anyone wants to optimize my regex feel free!  :)
This commit is contained in:
Collin Chaffin 2015-11-20 19:45:40 -06:00
parent 6da620de58
commit 72e45e3536

View File

@ -19,7 +19,7 @@ from ..utils import (
class PluralsightIE(InfoExtractor):
IE_NAME = 'pluralsight'
_VALID_URL = r'https?://(?:www\.)?pluralsight\.com/training/player\?author=(?P<author>[^&]+)&name=(?P<name>[^&]+)(?:&mode=live)?&clip=(?P<clip>\d+)&course=(?P<course>[^&]+)'
_VALID_URL = r'https?://?(?:www\.)?(?:app\.)?pluralsight\.com/training/player\?(?:(author=(?P<author>[^&]+))(&name=(?P<name>[^&]+))(&clip=(?P<clip>\d+))(&mode=live)(&course=(?P<course>[^&]+)))'
_LOGIN_URL = 'https://www.pluralsight.com/id/'
_NETRC_MACHINE = 'pluralsight'