summaryrefslogtreecommitdiffhomepage
path: root/youtube_dl
diff options
context:
space:
mode:
authorRemita Amine <[email protected]>2017-11-28 09:04:51 +0100
committerRemita Amine <[email protected]>2017-11-28 09:04:51 +0100
commita3474aa59e44b15471f46fcac8680d79e82d5116 (patch)
tree049c66be2b4ad6198589f50f57a811521b2d55f5 /youtube_dl
parent115afb77ec2d31764307c06866b63ba859d3aafb (diff)
downloadyoutube-dl-a3474aa59e44b15471f46fcac8680d79e82d5116.tar.gz
youtube-dl-a3474aa59e44b15471f46fcac8680d79e82d5116.zip
[Odnoklassniki] fix api metadata request(fixes #14862)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/odnoklassniki.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/youtube_dl/extractor/odnoklassniki.py b/youtube_dl/extractor/odnoklassniki.py
index 854b6800c..8e13bcf1f 100644
--- a/youtube_dl/extractor/odnoklassniki.py
+++ b/youtube_dl/extractor/odnoklassniki.py
@@ -14,6 +14,7 @@ from ..utils import (
int_or_none,
qualities,
unescapeHTML,
+ urlencode_postdata,
)
@@ -56,7 +57,7 @@ class OdnoklassnikiIE(InfoExtractor):
'url': 'http://ok.ru/video/64211978996595-1',
'md5': '2f206894ffb5dbfcce2c5a14b909eea5',
'info_dict': {
- 'id': '64211978996595-1',
+ 'id': 'V_VztHT5BzY',
'ext': 'mp4',
'title': 'Космическая среда от 26 августа 2015',
'description': 'md5:848eb8b85e5e3471a3a803dae1343ed0',
@@ -127,9 +128,14 @@ class OdnoklassnikiIE(InfoExtractor):
if metadata:
metadata = self._parse_json(metadata, video_id)
else:
+ data = {}
+ st_location = flashvars.get('location')
+ if st_location:
+ data['st.location'] = st_location
metadata = self._download_json(
compat_urllib_parse_unquote(flashvars['metadataUrl']),
- video_id, 'Downloading metadata JSON')
+ video_id, 'Downloading metadata JSON',
+ data=urlencode_postdata(data))
movie = metadata['movie']