From: Sergey M․ Date: Tue, 3 Oct 2017 21:27:42 +0000 (+0700) Subject: [beeg] Fix extraction (closes #14403) X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=6e736d86e7d03d14279c403202fe2a632e6e5023;p=youtube-dl [beeg] Fix extraction (closes #14403) --- diff --git a/youtube_dl/extractor/beeg.py b/youtube_dl/extractor/beeg.py index bbeae4bac..bf22a41b7 100644 --- a/youtube_dl/extractor/beeg.py +++ b/youtube_dl/extractor/beeg.py @@ -60,9 +60,13 @@ class BeegIE(InfoExtractor): beeg_version = beeg_version or '2185' beeg_salt = beeg_salt or 'pmweAkq8lAYKdfWcFCUj0yoVgoPlinamH5UE1CB3H' - video = self._download_json( - 'https://api.beeg.com/api/v6/%s/video/%s' % (beeg_version, video_id), - video_id) + for api_path in ('', 'api.'): + video = self._download_json( + 'https://%sbeeg.com/api/v6/%s/video/%s' + % (api_path, beeg_version, video_id), video_id, + fatal=api_path == 'api.') + if video: + break def split(o, e): def cut(s, x):