commit d04ca9761615e2ed3fdf89d8d87a4b9adfffacc3
parent 608c738c7d8e6be21f0cc0bb7a844bad9d841964
Author: Sergey M․ <dstftw@gmail.com>
Date:   Sun,  8 Apr 2018 22:21:21 +0700

[odnoklassniki] Improve _VALID_URL readability

Diffstat:
Myoutube_dl/extractor/odnoklassniki.py | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git 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',