aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/beeg.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-10-04 04:27:42 +0700
committerSergey M․ <dstftw@gmail.com>2017-10-04 04:27:42 +0700
commit6e736d86e7d03d14279c403202fe2a632e6e5023 (patch)
treee27746f7f4e4bf67e63670bc486fe8958228bab3 /youtube_dl/extractor/beeg.py
parentc110944fa2f21af733b4f3168764e1b008e11514 (diff)
[beeg] Fix extraction (closes #14403)
Diffstat (limited to 'youtube_dl/extractor/beeg.py')
-rw-r--r--youtube_dl/extractor/beeg.py10
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):