]> jfr.im git - yt-dlp.git/commitdiff
[DIYNetwork] Support new format (#934)
authorSipherdrakon <redacted>
Wed, 15 Sep 2021 00:25:03 +0000 (20:25 -0400)
committerGitHub <redacted>
Wed, 15 Sep 2021 00:25:03 +0000 (05:55 +0530)
Authored by: Sipherdrakon

yt_dlp/extractor/dplay.py
yt_dlp/extractor/extractors.py

index fcc4ce4dcc58c12e0c97d21b3bfcf1918860b672..f2aca4d67a1d6f5958538009b513a5c1db71dcb6 100644 (file)
@@ -389,3 +389,23 @@ class ScienceChannelIE(DiscoveryPlusIE):
 
     _PRODUCT = 'sci'
     _API_URL = 'us1-prod-direct.sciencechannel.com'
+
+
+class DIYNetworkIE(DiscoveryPlusIE):
+    _VALID_URL = r'https?://(?:watch\.)?diynetwork\.com/video' + DPlayIE._PATH_REGEX
+    _TESTS = [{
+        'url': 'https://watch.diynetwork.com/video/pool-kings-diy-network/bringing-beach-life-to-texas',
+        'info_dict': {
+            'id': '2309730',
+            'display_id': 'pool-kings-diy-network/bringing-beach-life-to-texas',
+            'ext': 'mp4',
+            'title': 'Bringing Beach Life to Texas',
+            'description': 'The Pool Kings give a family a day at the beach in their own backyard.',
+            'season_number': 10,
+            'episode_number': 2,
+        },
+        'skip': 'Available for Premium users',
+    }]
+
+    _PRODUCT = 'diy'
+    _API_URL = 'us1-prod-direct.watch.diynetwork.com'
index bd6aabdd76f3496f4c3706c7638f22aa2fe3eebe..ecbb8797705f6c7d4a00e17ccff7b727a9beda74 100644 (file)
     DPlayIE,
     DiscoveryPlusIE,
     HGTVDeIE,
-    ScienceChannelIE
+    ScienceChannelIE,
+    DIYNetworkIE
 )
 from .dreisat import DreiSatIE
 from .drbonanza import DRBonanzaIE