# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class ThisVidIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?thisvid\.com/(?Pvideos|embed)/(?P[A-Za-z0-9-]+/?)' _TESTS = [{ 'url': 'https://thisvid.com/videos/big-man-walking26/', 'md5': '74a11cac6a738f28c1a37945145a3f96', 'info_dict': { 'id': '2123318', 'ext': 'mp4', 'title': 'Big Man Walking26', 'thumbnail': 'https://media.thisvid.com/contents/videos_screenshots/2123000/2123318/preview.mp4.jpg', 'age_limit': 18, } }, { 'url': 'https://thisvid.com/embed/2123318/', 'md5': '74a11cac6a738f28c1a37945145a3f96', 'info_dict': { 'id': '2123318', 'ext': 'mp4', 'title': 'Big Man Walking26', 'thumbnail': 'https://media.thisvid.com/contents/videos_screenshots/2123000/2123318/preview.mp4.jpg', 'age_limit': 18, } }] def _real_extract(self, url): main_id = self._match_id(url) webpage = self._download_webpage(url, main_id) # URL decryptor was reversed from version 4.0.4, later verified working with 5.0.1 and may change in the future. kvs_version = self._html_search_regex(r'