aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dlc/extractor/nick.py
diff options
context:
space:
mode:
authorTom-Oliver Heidel <github@tom-oliver.eu>2020-10-17 10:26:57 +0200
committerGitHub <noreply@github.com>2020-10-17 10:26:57 +0200
commit963eaf53fe633ea78e7bf972d5a0e2303a7cf8a9 (patch)
tree72a4904312aec96ed06f33bb2dde52fa7ef137e1 /youtube_dlc/extractor/nick.py
parent07892b3fcc960598ca56e06a6e3307549029c7d7 (diff)
parent51707d9a7a4b7808d350bfa6565f8668e4a30dd9 (diff)
downloadhypervideo-pre-963eaf53fe633ea78e7bf972d5a0e2303a7cf8a9.tar.lz
hypervideo-pre-963eaf53fe633ea78e7bf972d5a0e2303a7cf8a9.tar.xz
hypervideo-pre-963eaf53fe633ea78e7bf972d5a0e2303a7cf8a9.zip
Merge pull request #193 from blackjack4494/NICK_MTV
[MTV/Nick] universal mgid extractor + fix nick.de feed
Diffstat (limited to 'youtube_dlc/extractor/nick.py')
-rw-r--r--youtube_dlc/extractor/nick.py20
1 files changed, 5 insertions, 15 deletions
diff --git a/youtube_dlc/extractor/nick.py b/youtube_dlc/extractor/nick.py
index 04b98f7bd..7e981b8c1 100644
--- a/youtube_dlc/extractor/nick.py
+++ b/youtube_dlc/extractor/nick.py
@@ -176,21 +176,11 @@ class NickDeIE(MTVServicesInfoExtractor):
'only_matching': True,
}]
- def _extract_mrss_url(self, webpage, host):
- return update_url_query(self._search_regex(
- r'data-mrss=(["\'])(?P<url>http.+?)\1', webpage, 'mrss url', group='url'),
- {'siteKey': host})
-
- def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
- host = mobj.group('host')
-
- webpage = self._download_webpage(url, video_id)
-
- mrss_url = self._extract_mrss_url(webpage, host)
-
- return self._get_videos_info_from_url(mrss_url, video_id)
+ def _get_feed_url(self, uri, url=None):
+ video_id = self._id_from_uri(uri)
+ config = self._download_json(
+ 'http://media.mtvnservices.com/pmt/e1/access/index.html?uri=%s&configtype=edge&ref=%s' % (uri, url), video_id)
+ return self._remove_template_parameter(config['feedWithQueryParams'])
class NickNightIE(NickDeIE):