From 79f0914f4002554ea441050b7b7e38a2e66ab1c9 Mon Sep 17 00:00:00 2001 From: Micah Focht Date: Wed, 13 Dec 2017 00:40:19 -0500 Subject: [PATCH] Fix some problems with BYU TV Ok, a bit of a beginner here. I ran into an issue when trying to download an episode of Studio C from BYU TV. Basically, any links from the site aren't recognized as valid links. This is a reasonably large problem, but it was also fairly easy to solve. Essentially, in the URL, they changed watch to player. So I changed that, and links were recognized again. That's progress. But, it still spits out the error "ERROR: Unable to extract episode information" I've narrowed this down to line 38 I believe. I don't really know how to fix this error, since it seems to be calling another function within common.py at line 2581. I don't really have the expertise to diagnose this any further. Hopefully someone else will see this and know what to do. I'm committing this because regardless of the fact that an error still exists, this fixes one. I would spend more time on this, but it's nearing 1 am and I have a feeling I'll forget what I was doing when I wake up. I'll create a issue and reference this pull request as well. Thanks for the help, Micah. --- youtube_dl/extractor/byutv.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/youtube_dl/extractor/byutv.py b/youtube_dl/extractor/byutv.py index 8ef089653..a26daa523 100644 --- a/youtube_dl/extractor/byutv.py +++ b/youtube_dl/extractor/byutv.py @@ -7,9 +7,9 @@ from ..utils import ExtractorError class BYUtvIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?byutv\.org/watch/(?!event/)(?P[0-9a-f-]+)(?:/(?P[^/?#&]+))?' + _VALID_URL = r'https?://(?:www\.)?byutv\.org/player/(?!event/)(?P[0-9a-f-]+)(?:/(?P[^/?#&]+))?' _TESTS = [{ - 'url': 'http://www.byutv.org/watch/6587b9a3-89d2-42a6-a7f7-fd2f81840a7d/studio-c-season-5-episode-5', + 'url': 'http://www.byutv.org/player/6587b9a3-89d2-42a6-a7f7-fd2f81840a7d/studio-c-season-5-episode-5', 'info_dict': { 'id': '6587b9a3-89d2-42a6-a7f7-fd2f81840a7d', 'display_id': 'studio-c-season-5-episode-5', @@ -24,7 +24,7 @@ class BYUtvIE(InfoExtractor): }, 'add_ie': ['Ooyala'], }, { - 'url': 'http://www.byutv.org/watch/6587b9a3-89d2-42a6-a7f7-fd2f81840a7d', + 'url': 'http://www.byutv.org/player/6587b9a3-89d2-42a6-a7f7-fd2f81840a7d', 'only_matching': True, }] @@ -57,7 +57,7 @@ class BYUtvIE(InfoExtractor): class BYUtvEventIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?byutv\.org/watch/event/(?P[0-9a-f-]+)' + _VALID_URL = r'https?://(?:www\.)?byutv\.org/player/event/(?P[0-9a-f-]+)' _TEST = { 'url': 'http://www.byutv.org/watch/event/29941b9b-8bf6-48d2-aebf-7a87add9e34b', 'info_dict': {