diff options
author | Sergey M․ <dstftw@gmail.com> | 2017-10-04 04:27:42 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-10-04 04:27:42 +0700 |
commit | 6e736d86e7d03d14279c403202fe2a632e6e5023 (patch) | |
tree | e27746f7f4e4bf67e63670bc486fe8958228bab3 /youtube_dl/extractor | |
parent | c110944fa2f21af733b4f3168764e1b008e11514 (diff) | |
download | youtube-dl-6e736d86e7d03d14279c403202fe2a632e6e5023.tar.xz |
[beeg] Fix extraction (closes #14403)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/beeg.py | 10 |
1 files changed, 7 insertions, 3 deletions
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): |