aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Hieber <rohieb@users.noreply.github.com>2025-01-29 00:38:26 +0100
committerGitHub <noreply@github.com>2025-01-28 23:38:26 +0000
commit9fb8ab2ff67fb699f60cce09163a580976e90c0e (patch)
tree35bc0e768facd4e0d9c8f628e9bf357a459e7a4f
parent18a28514e306e822eab4f3a79c76d515bf076406 (diff)
[ie/pbs] Support www.thirteen.org URLs (#11191)
Authored by: rohieb
-rw-r--r--yt_dlp/extractor/pbs.py29
1 files changed, 27 insertions, 2 deletions
diff --git a/yt_dlp/extractor/pbs.py b/yt_dlp/extractor/pbs.py
index 7b84515e2..2f839a2e9 100644
--- a/yt_dlp/extractor/pbs.py
+++ b/yt_dlp/extractor/pbs.py
@@ -61,7 +61,7 @@ class PBSIE(InfoExtractor):
(r'video\.wyomingpbs\.org', 'Wyoming PBS (KCWC)'), # http://www.wyomingpbs.org
(r'video\.cpt12\.org', 'Colorado Public Television / KBDI 12 (KBDI)'), # http://www.cpt12.org/
(r'video\.kbyueleven\.org', 'KBYU-TV (KBYU)'), # http://www.kbyutv.org/
- (r'video\.thirteen\.org', 'Thirteen/WNET New York (WNET)'), # http://www.thirteen.org
+ (r'(?:video\.|www\.)thirteen\.org', 'Thirteen/WNET New York (WNET)'), # http://www.thirteen.org
(r'video\.wgbh\.org', 'WGBH/Channel 2 (WGBH)'), # http://wgbh.org
(r'video\.wgby\.org', 'WGBY (WGBY)'), # http://www.wgby.org
(r'watch\.njtvonline\.org', 'NJTV Public Media NJ (WNJT)'), # http://www.njtvonline.org/
@@ -208,16 +208,40 @@ class PBSIE(InfoExtractor):
'description': 'md5:31b664af3c65fd07fa460d306b837d00',
'duration': 3190,
},
+ 'skip': 'dead URL',
+ },
+ {
+ 'url': 'https://www.thirteen.org/programs/the-woodwrights-shop/carving-away-with-mary-may-tioglz/',
+ 'info_dict': {
+ 'id': '3004803331',
+ 'ext': 'mp4',
+ 'title': "The Woodwright's Shop - Carving Away with Mary May",
+ 'description': 'md5:7cbaaaa8b9bcc78bd8f0e31911644e28',
+ 'duration': 1606,
+ 'display_id': 'carving-away-with-mary-may-tioglz',
+ 'chapters': [],
+ 'thumbnail': 'https://image.pbs.org/video-assets/NcnTxNl-asset-mezzanine-16x9-K0Keoyv.jpg',
+ },
},
{
'url': 'http://www.pbs.org/wgbh/pages/frontline/losing-iraq/',
- 'md5': '6f722cb3c3982186d34b0f13374499c7',
+ 'md5': '372b12b670070de39438b946474df92f',
'info_dict': {
'id': '2365297690',
'ext': 'mp4',
'title': 'FRONTLINE - Losing Iraq',
'description': 'md5:5979a4d069b157f622d02bff62fbe654',
'duration': 5050,
+ 'chapters': [
+ {'start_time': 0.0, 'end_time': 1234.0, 'title': 'After Saddam, Chaos'},
+ {'start_time': 1233.0, 'end_time': 1719.0, 'title': 'The Insurgency Takes Root'},
+ {'start_time': 1718.0, 'end_time': 2461.0, 'title': 'A Light Footprint'},
+ {'start_time': 2460.0, 'end_time': 3589.0, 'title': 'The Surge '},
+ {'start_time': 3588.0, 'end_time': 4355.0, 'title': 'The Withdrawal '},
+ {'start_time': 4354.0, 'end_time': 5051.0, 'title': 'ISIS on the March '},
+ ],
+ 'display_id': 'losing-iraq',
+ 'thumbnail': 'https://image.pbs.org/video-assets/pbs/frontline/138098/images/mezzanine_401.jpg',
},
},
{
@@ -477,6 +501,7 @@ class PBSIE(InfoExtractor):
r"div\s*:\s*'videoembed'\s*,\s*mediaid\s*:\s*'(\d+)'", # frontline video embed
r'class="coveplayerid">([^<]+)<', # coveplayer
r'<section[^>]+data-coveid="(\d+)"', # coveplayer from http://www.pbs.org/wgbh/frontline/film/real-csi/
+ r'\bclass="passportcoveplayer"[^>]+\bdata-media="(\d+)', # https://www.thirteen.org/programs/the-woodwrights-shop/who-wrote-the-book-of-sloyd-fggvvq/
r'<input type="hidden" id="pbs_video_id_[0-9]+" value="([0-9]+)"/>', # jwplayer
r"(?s)window\.PBS\.playerConfig\s*=\s*{.*?id\s*:\s*'([0-9]+)',",
r'<div[^>]+\bdata-cove-id=["\'](\d+)"', # http://www.pbs.org/wgbh/roadshow/watch/episode/2105-indianapolis-hour-2/