about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2018-04-08 22:21:21 +0700
committerSergey M․ <dstftw@gmail.com>2018-04-08 22:21:21 +0700
commitd04ca9761615e2ed3fdf89d8d87a4b9adfffacc3 (patch)
treeee877373153f903d967b9934466c209d811f1529
parent608c738c7d8e6be21f0cc0bb7a844bad9d841964 (diff)
downloadyoutube-dl-d04ca9761615e2ed3fdf89d8d87a4b9adfffacc3.tar.gz
youtube-dl-d04ca9761615e2ed3fdf89d8d87a4b9adfffacc3.tar.xz
youtube-dl-d04ca9761615e2ed3fdf89d8d87a4b9adfffacc3.zip
[odnoklassniki] Improve _VALID_URL readability
-rw-r--r--youtube_dl/extractor/odnoklassniki.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/youtube_dl/extractor/odnoklassniki.py b/youtube_dl/extractor/odnoklassniki.py
index d87d0960f..190d8af4d 100644
--- a/youtube_dl/extractor/odnoklassniki.py
+++ b/youtube_dl/extractor/odnoklassniki.py
@@ -19,7 +19,18 @@ from ..utils import (
 
 
 class OdnoklassnikiIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:(?:www|m|mobile)\.)?(?:odnoklassniki|ok)\.ru/(?:video(?:embed)?/|web-api/video/moviePlayer/|live/|dk\?.*?st\.mvId=)(?P<id>[\d-]+)'
+    _VALID_URL = r'''(?x)
+                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',