From: Sergey M․ Date: Thu, 11 Feb 2016 16:02:37 +0000 (+0600) Subject: [pbs] Fix multi part videos extraction X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=6b3fbd3425180a00d99e91e6f2b9b5896c567ea4;p=youtube-dl [pbs] Fix multi part videos extraction --- diff --git a/youtube_dl/extractor/pbs.py b/youtube_dl/extractor/pbs.py index c159c0071..cca012953 100644 --- a/youtube_dl/extractor/pbs.py +++ b/youtube_dl/extractor/pbs.py @@ -366,10 +366,14 @@ class PBSIE(InfoExtractor): webpage, 'upload date', default=None)) # tabbed frontline videos - tabbed_videos = re.findall( - r']+class="videotab[^"]*"[^>]+vid="(\d+)"', webpage) - if tabbed_videos: - return tabbed_videos, presumptive_id, upload_date + MULTI_PART_REGEXES = ( + r']+class="videotab[^"]*"[^>]+vid="(\d+)"', + r']+href=["\']#video-\d+["\'][^>]+data-coveid=["\'](\d+)', + ) + for p in MULTI_PART_REGEXES: + tabbed_videos = re.findall(p, webpage) + if tabbed_videos: + return tabbed_videos, presumptive_id, upload_date MEDIA_ID_REGEXES = [ r"div\s*:\s*'videoembed'\s*,\s*mediaid\s*:\s*'(\d+)'", # frontline video embed