diff options
author | Unknown <blackjack4494@web.de> | 2020-09-03 04:06:30 +0200 |
---|---|---|
committer | Unknown <blackjack4494@web.de> | 2020-09-03 04:06:30 +0200 |
commit | 53d26f24069590f47985dfd1eb3f4c90642e676a (patch) | |
tree | 7768d8013f0e0c4a304a8284b3a4a6ede721bd58 /youtube_dl/extractor/plays.py | |
parent | e367127957d37b51720ebc6f8cea5430ef67e863 (diff) | |
download | hypervideo-pre-53d26f24069590f47985dfd1eb3f4c90642e676a.tar.lz hypervideo-pre-53d26f24069590f47985dfd1eb3f4c90642e676a.tar.xz hypervideo-pre-53d26f24069590f47985dfd1eb3f4c90642e676a.zip |
[skip travis] revert automerge for now
Diffstat (limited to 'youtube_dl/extractor/plays.py')
-rw-r--r-- | youtube_dl/extractor/plays.py | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/youtube_dl/extractor/plays.py b/youtube_dl/extractor/plays.py deleted file mode 100644 index ddfc6f148..000000000 --- a/youtube_dl/extractor/plays.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 -from __future__ import unicode_literals - -import re - -from .common import InfoExtractor -from ..utils import int_or_none - - -class PlaysTVIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?plays\.tv/(?:video|embeds)/(?P<id>[0-9a-f]{18})' - _TESTS = [{ - 'url': 'https://plays.tv/video/56af17f56c95335490/when-you-outplay-the-azir-wall', - 'md5': 'dfeac1198506652b5257a62762cec7bc', - 'info_dict': { - 'id': '56af17f56c95335490', - 'ext': 'mp4', - 'title': 'Bjergsen - When you outplay the Azir wall', - 'description': 'Posted by Bjergsen', - } - }, { - 'url': 'https://plays.tv/embeds/56af17f56c95335490', - 'only_matching': True, - }] - - def _real_extract(self, url): - video_id = self._match_id(url) - webpage = self._download_webpage( - 'https://plays.tv/video/%s' % video_id, video_id) - - info = self._search_json_ld(webpage, video_id,) - - mpd_url, sources = re.search( - r'(?s)<video[^>]+data-mpd="([^"]+)"[^>]*>(.+?)</video>', - webpage).groups() - formats = self._extract_mpd_formats( - self._proto_relative_url(mpd_url), video_id, mpd_id='DASH') - for format_id, height, format_url in re.findall(r'<source\s+res="((\d+)h?)"\s+src="([^"]+)"', sources): - formats.append({ - 'url': self._proto_relative_url(format_url), - 'format_id': 'http-' + format_id, - 'height': int_or_none(height), - }) - self._sort_formats(formats) - - info.update({ - 'id': video_id, - 'description': self._og_search_description(webpage), - 'thumbnail': info.get('thumbnail') or self._og_search_thumbnail(webpage), - 'formats': formats, - }) - - return info |