]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[pbs] restrict direct video url regex(fixes #14519)
authorRemita Amine <remitamine@gmail.com>
Tue, 17 Oct 2017 09:22:43 +0000 (09:22 +0000)
committerRemita Amine <remitamine@gmail.com>
Tue, 17 Oct 2017 09:23:11 +0000 (09:23 +0000)
youtube_dl/extractor/pbs.py

index 8889e4a1aaa3e41f49a63b53c010cf69d0842b1b..b51dcbe10dd14136220516c76e6cada7f70a9b0c 100644 (file)
@@ -187,7 +187,7 @@ class PBSIE(InfoExtractor):
     _VALID_URL = r'''(?x)https?://
         (?:
            # Direct video URL
-           (?:%s)/(?:viralplayer|video)/(?P<id>[0-9]+)/? |
+           (?:%s)/(?:(?:vir|port)alplayer|video)/(?P<id>[0-9]+)(?:[?/]|$) |
            # Article with embedded player (or direct video)
            (?:www\.)?pbs\.org/(?:[^/]+/){1,5}(?P<presumptive_id>[^/]+?)(?:\.html)?/?(?:$|[?\#]) |
            # Player
@@ -367,6 +367,10 @@ class PBSIE(InfoExtractor):
         {
             'url': 'http://watch.knpb.org/video/2365616055/',
             'only_matching': True,
+        },
+        {
+            'url': 'https://player.pbs.org/portalplayer/3004638221/?uid=',
+            'only_matching': True,
         }
     ]
     _ERRORS = {