From 810dfad7b9e2093a288a8e54bd267dc65263a8d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Valli=C3=A8res-Lagac=C3=A9?= Date: Mon, 24 Feb 2020 13:33:57 -0500 Subject: [PATCH] Added Support for HGTV.ca Since both hgtv.ca and hgtv.com are using the same CMS, by updating the existing script to support both domains, it works well. --- youtube_dl/extractor/extractors.py | 2 +- youtube_dl/extractor/hgtv.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 64d1fa251..f0e99c580 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -425,7 +425,7 @@ from .heise import HeiseIE from .hellporno import HellPornoIE from .helsinki import HelsinkiIE from .hentaistigma import HentaiStigmaIE -from .hgtv import HGTVComShowIE +from .hgtv import HGTVShowIE from .hketv import HKETVIE from .hidive import HiDiveIE from .historicfilms import HistoricFilmsIE diff --git a/youtube_dl/extractor/hgtv.py b/youtube_dl/extractor/hgtv.py index a4f332565..ebdb5d31c 100644 --- a/youtube_dl/extractor/hgtv.py +++ b/youtube_dl/extractor/hgtv.py @@ -4,17 +4,17 @@ from __future__ import unicode_literals from .common import InfoExtractor -class HGTVComShowIE(InfoExtractor): - IE_NAME = 'hgtv.com:show' - _VALID_URL = r'https?://(?:www\.)?hgtv\.com/shows/[^/]+/(?P[^/?#&]+)' +class HGTVShowIE(InfoExtractor): + IE_NAME = 'hgtv:show' + _VALID_URL = r'https?://(?:www\.)?hgtv\.(?:com|ca)/shows/[^/]+/(?P[^/?#&]+)' _TESTS = [{ # data-module="video" - 'url': 'http://www.hgtv.com/shows/flip-or-flop/flip-or-flop-full-episodes-season-4-videos', + 'url': 'https://www.hgtv.com/shows/fixer-upper/fixer-upper-full-episodes-videos', 'info_dict': { - 'id': 'flip-or-flop-full-episodes-season-4-videos', - 'title': 'Flip or Flop Full Episodes', + 'id': 'fixer-upper-full-episodes-videos', + 'title': 'Fixer Upper - Full Episodes', }, - 'playlist_mincount': 15, + 'playlist_mincount': 14, }, { # data-deferred-module="video" 'url': 'http://www.hgtv.com/shows/good-bones/episodes/an-old-victorian-house-gets-a-new-facelift',