[pbs] Add support for widget URLs (Fixes #2594)
authorPhilipp Hagemeister <phihag@phihag.de>
Thu, 20 Mar 2014 23:46:32 +0000 (00:46 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Thu, 20 Mar 2014 23:46:32 +0000 (00:46 +0100)
test/test_all_urls.py
youtube_dl/extractor/pbs.py

index 3ce0b910a16d8bac978f00388b3c0210961b63dc..39ac8b8a1188746348dd1c15058ec71ccc75b769 100644 (file)
@@ -141,6 +141,7 @@ class TestAllURLsMatching(unittest.TestCase):
     def test_pbs(self):
         # https://github.com/rg3/youtube-dl/issues/2350
         self.assertMatch('http://video.pbs.org/viralplayer/2365173446/', ['PBS'])
+        self.assertMatch('http://video.pbs.org/widget/partnerplayer/980042464/', ['PBS'])
 
 if __name__ == '__main__':
     unittest.main()
index e7e0042fb4e39a77061976078d4662a9cc17f522..56fbe3d56e8ff65a9710e7888828b5980fccab99 100644 (file)
@@ -13,7 +13,7 @@ class PBSIE(InfoExtractor):
             # Article with embedded player
            (?:www\.)?pbs\.org/(?:[^/]+/){2,5}(?P<presumptive_id>[^/]+)/?(?:$|[?\#]) |
            # Player
-           video\.pbs\.org/partnerplayer/(?P<player_id>[^/]+)/
+           video\.pbs\.org/(?:widget/)?partnerplayer/(?P<player_id>[^/]+)/
         )
     '''