aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/odnoklassniki.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-01-28 22:56:49 +0600
committerSergey M․ <dstftw@gmail.com>2016-01-28 22:56:49 +0600
commit10e6ed93417fb51c606af2e3e47b9a5a094dd6ee (patch)
tree1c62f5137c1cb440267310d33f511e234f338816 /youtube_dl/extractor/odnoklassniki.py
parent38c84acae512f1b218e5146f4b2ddcac6b1a5e13 (diff)
[ok] Add support for mobile URLs (Closes #8345)
Diffstat (limited to 'youtube_dl/extractor/odnoklassniki.py')
-rw-r--r--youtube_dl/extractor/odnoklassniki.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/youtube_dl/extractor/odnoklassniki.py b/youtube_dl/extractor/odnoklassniki.py
index 184c7a323..f9e064a60 100644
--- a/youtube_dl/extractor/odnoklassniki.py
+++ b/youtube_dl/extractor/odnoklassniki.py
@@ -13,7 +13,7 @@ from ..utils import (
class OdnoklassnikiIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?(?:odnoklassniki|ok)\.ru/(?:video(?:embed)?|web-api/video/moviePlayer)/(?P<id>[\d-]+)'
+ _VALID_URL = r'https?://(?:(?:www|m|mobile)\.)?(?:odnoklassniki|ok)\.ru/(?:video(?:embed)?|web-api/video/moviePlayer)/(?P<id>[\d-]+)'
_TESTS = [{
# metadata in JSON
'url': 'http://ok.ru/video/20079905452',
@@ -69,6 +69,12 @@ class OdnoklassnikiIE(InfoExtractor):
}, {
'url': 'http://www.ok.ru/videoembed/20648036891',
'only_matching': True,
+ }, {
+ 'url': 'http://m.ok.ru/video/20079905452',
+ 'only_matching': True,
+ }, {
+ 'url': 'http://mobile.ok.ru/video/20079905452',
+ 'only_matching': True,
}]
def _real_extract(self, url):