From 3e7425297fcde6b04832901a8a991f166864b4de Mon Sep 17 00:00:00 2001 From: Lauren Liberda Date: Tue, 16 Mar 2021 15:23:46 +0100 Subject: [PATCH] [pulsevideo] unduplicating formats --- haruhi_dl/extractor/pulsembed.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/haruhi_dl/extractor/pulsembed.py b/haruhi_dl/extractor/pulsembed.py index fd39d8c66..d7ecdf899 100644 --- a/haruhi_dl/extractor/pulsembed.py +++ b/haruhi_dl/extractor/pulsembed.py @@ -55,13 +55,13 @@ class PulseVideoIE(InfoExtractor): def _extract_from_id(self, video_id, webpage=None): response = self._download_json( - 'http://qi.ckm.onetapi.pl/', video_id, + 'https://player-api.dreamlab.pl/', video_id, query={ 'body[id]': video_id, 'body[jsonrpc]': '2.0', 'body[method]': 'get_asset_detail', 'body[params][ID_Publikacji]': video_id, - 'body[params][Service]': 'www.onet.pl', + 'body[params][version]': '2.0', 'content-type': 'application/jsonp', 'x-onet-app': 'player.front.onetapi.pl', }) @@ -84,6 +84,10 @@ class PulseVideoIE(InfoExtractor): video_url = f.get('url') if not video_url: continue + # UHD formats are bullshit, they are just duplicates + # https://git.sakamoto.pl/laudompat/haruhi-dl/-/issues/45 + if format_id.endswith('-uhd') and formats_dict.get(format_id[:-len('-uhd')]): + continue ext = determine_ext(video_url) if format_id.startswith('ism'): formats.extend(self._extract_ism_formats(