Browse Source
[odnoklassniki] Improve _VALID_URL readability
master
Sergey M․
6 years ago
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
1 changed files with
12 additions and
1 deletions
-
youtube_dl/extractor/odnoklassniki.py
|
@ -19,7 +19,18 @@ from ..utils import ( |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class OdnoklassnikiIE(InfoExtractor): |
|
|
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 = [{ |
|
|
_TESTS = [{ |
|
|
# metadata in JSON |
|
|
# metadata in JSON |
|
|
'url': 'http://ok.ru/video/20079905452', |
|
|
'url': 'http://ok.ru/video/20079905452', |
|
|