diff --git a/youtube_dl/extractor/airvuz.py b/youtube_dl/extractor/airvuz.py index 325b2e2be..0ae35759a 100644 --- a/youtube_dl/extractor/airvuz.py +++ b/youtube_dl/extractor/airvuz.py @@ -2,27 +2,45 @@ from __future__ import unicode_literals from .common import InfoExtractor +from ..compat import compat_urllib_parse_unquote import re class AirVuzIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?airvuz\.com/video/(?P.+)\?id=(?P.+)' - _TEST = { - 'url': 'https://www.airvuz.com/video/An-Imaginary-World?id=599e85c49282a717c50f2f7a', - 'info_dict': { - 'id': '599e85c49282a717c50f2f7a', - 'display_id': 'An-Imaginary-World', - 'title': 'md5:7fc56270e7a70fa81a5935b72eacbe29', - 'ext': 'mp4', - 'thumbnail': r're:^https?://.*\.jpg$', + _TESTS = [ + { + 'url': 'https://www.airvuz.com/video/An-Imaginary-World?id=599e85c49282a717c50f2f7a', + 'info_dict': { + 'id': '599e85c49282a717c50f2f7a', + 'display_id': 'An-Imaginary-World', + 'title': 'An Imaginary World', + 'ext': 'mp4', + 'thumbnail': r're:^https?://.*\.jpg', + 'uploader': 'Tobias Hรคgg', + 'description': 'md5:176b43a79a0a19d592c0261d9c0a48c7', + } }, - } + # Emojis in the URL, title and description + { + 'url': 'https://www.airvuz.com/video/Cinematic-FPV-Flying-at-a-Cove-%F0%9F%8C%8A%F0%9F%8C%8A%F0%9F%8C%8A-The-rocks-waves-and-seaweed%F0%9F%98%8D?id=5d3db133ec63bf7e65c2226e', + 'info_dict': { + 'id': '5d3db133ec63bf7e65c2226e', + 'display_id': 'Cinematic-FPV-Flying-at-a-Cove-๐ŸŒŠ๐ŸŒŠ๐ŸŒŠ-The-rocks-waves-and-seaweed๐Ÿ˜', + 'title': 'Cinematic FPV Flying at a Cove! ๐ŸŒŠ๐ŸŒŠ๐ŸŒŠ The rocks, waves, and seaweed๐Ÿ˜!', + 'ext': 'mp4', + 'thumbnail': r're:^https?://.*\.jpg', + 'uploader': 'Mako Reactra', + 'description': 'md5:ac91310ff7c2de26a0f1e8e8caae2ee6' + }, + }, + ] def _real_extract(self, url): groups = re.match(self._VALID_URL, url) video_id = groups.group('id') - display_id = groups.group('display_id') + display_id = compat_urllib_parse_unquote(groups.group('display_id')) webpage = self._download_webpage(url, video_id) @@ -47,7 +65,6 @@ class AirVuzIE(InfoExtractor): formats.append({ 'url': video_url, 'format_id': res.get('label'), - 'height': res.get('res') }) else: self.report_extraction(video_id) @@ -57,6 +74,7 @@ class AirVuzIE(InfoExtractor): if video_url: format_id = video_url.split("-")[-1].split(".")[0] if len(format_id) <= 2: + # Format can't be induced from the filename format_id = None formats.append({