about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGDR! <gdr@gdr.name>2018-04-08 17:13:00 +0200
committerSergey M <dstftw@gmail.com>2018-04-08 22:13:00 +0700
commit608c738c7d8e6be21f0cc0bb7a844bad9d841964 (patch)
tree3bcb505a934068b8d34a97e08d968a810355d062
parent66b686727b198a6b14ddcbcfdcbaadd5b203362f (diff)
downloadyoutube-dl-608c738c7d8e6be21f0cc0bb7a844bad9d841964.tar.gz
youtube-dl-608c738c7d8e6be21f0cc0bb7a844bad9d841964.tar.xz
youtube-dl-608c738c7d8e6be21f0cc0bb7a844bad9d841964.zip
[odnoklassniki] Extend _VALID_URL (closes #16081)
-rw-r--r--youtube_dl/extractor/odnoklassniki.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/odnoklassniki.py b/youtube_dl/extractor/odnoklassniki.py
index 5c8b37e18..d87d0960f 100644
--- a/youtube_dl/extractor/odnoklassniki.py
+++ b/youtube_dl/extractor/odnoklassniki.py
@@ -19,7 +19,7 @@ from ..utils import (
 
 
 class OdnoklassnikiIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:(?:www|m|mobile)\.)?(?:odnoklassniki|ok)\.ru/(?:video(?:embed)?|web-api/video/moviePlayer|live)/(?P<id>[\d-]+)'
+    _VALID_URL = r'https?://(?:(?:www|m|mobile)\.)?(?:odnoklassniki|ok)\.ru/(?:video(?:embed)?/|web-api/video/moviePlayer/|live/|dk\?.*?st\.mvId=)(?P<id>[\d-]+)'
     _TESTS = [{
         # metadata in JSON
         'url': 'http://ok.ru/video/20079905452',
@@ -101,6 +101,9 @@ class OdnoklassnikiIE(InfoExtractor):
     }, {
         'url': 'https://www.ok.ru/live/484531969818',
         'only_matching': True,
+    }, {
+        'url': 'https://m.ok.ru/dk?st.cmd=movieLayer&st.discId=863789452017&st.retLoc=friend&st.rtu=%2Fdk%3Fst.cmd%3DfriendMovies%26st.mode%3Down%26st.mrkId%3D%257B%2522uploadedMovieMarker%2522%253A%257B%2522marker%2522%253A%25221519410114503%2522%252C%2522hasMore%2522%253Atrue%257D%252C%2522sharedMovieMarker%2522%253A%257B%2522marker%2522%253Anull%252C%2522hasMore%2522%253Afalse%257D%257D%26st.friendId%3D561722190321%26st.frwd%3Don%26_prevCmd%3DfriendMovies%26tkn%3D7257&st.discType=MOVIE&st.mvId=863789452017&_prevCmd=friendMovies&tkn=3648#lst#',
+        'only_matching': True,
     }]
 
     def _real_extract(self, url):