commit 88b87b08b1ed06940053ee018547de051bf8d986
parent 20baa17c0180c7254644abea968792abcf0743cb
Author: Remita Amine <remitamine@gmail.com>
Date:   Sat,  9 Nov 2019 17:01:21 +0100

[minhateca] remove extractor

Diffstat:
Myoutube_dl/extractor/extractors.py | 1-
Dyoutube_dl/extractor/minhateca.py | 70----------------------------------------------------------------------
2 files changed, 0 insertions(+), 71 deletions(-)

diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py @@ -625,7 +625,6 @@ from .microsoftvirtualacademy import ( MicrosoftVirtualAcademyIE, MicrosoftVirtualAcademyCourseIE, ) -from .minhateca import MinhatecaIE from .ministrygrid import MinistryGridIE from .minoto import MinotoIE from .miomio import MioMioIE diff --git a/youtube_dl/extractor/minhateca.py b/youtube_dl/extractor/minhateca.py @@ -1,70 +0,0 @@ -# coding: utf-8 -from __future__ import unicode_literals - -from .common import InfoExtractor -from ..utils import ( - int_or_none, - parse_duration, - parse_filesize, - sanitized_Request, - urlencode_postdata, -) - - -class MinhatecaIE(InfoExtractor): - _VALID_URL = r'https?://minhateca\.com\.br/[^?#]+,(?P<id>[0-9]+)\.' - _TEST = { - 'url': 'http://minhateca.com.br/pereba/misc/youtube-dl+test+video,125848331.mp4(video)', - 'info_dict': { - 'id': '125848331', - 'ext': 'mp4', - 'title': 'youtube-dl test video', - 'thumbnail': r're:^https?://.*\.jpg$', - 'filesize_approx': 1530000, - 'duration': 9, - 'view_count': int, - } - } - - def _real_extract(self, url): - video_id = self._match_id(url) - webpage = self._download_webpage(url, video_id) - - token = self._html_search_regex( - r'<input name="__RequestVerificationToken".*?value="([^"]+)"', - webpage, 'request token') - token_data = [ - ('fileId', video_id), - ('__RequestVerificationToken', token), - ] - req = sanitized_Request( - 'http://minhateca.com.br/action/License/Download', - data=urlencode_postdata(token_data)) - req.add_header('Content-Type', 'application/x-www-form-urlencoded') - data = self._download_json( - req, video_id, note='Downloading metadata') - - video_url = data['redirectUrl'] - title_str = self._html_search_regex( - r'<h1.*?>(.*?)</h1>', webpage, 'title') - title, _, ext = title_str.rpartition('.') - filesize_approx = parse_filesize(self._html_search_regex( - r'<p class="fileSize">(.*?)</p>', - webpage, 'file size approximation', fatal=False)) - duration = parse_duration(self._html_search_regex( - r'(?s)<p class="fileLeng[ht][th]">.*?class="bold">(.*?)<', - webpage, 'duration', fatal=False)) - view_count = int_or_none(self._html_search_regex( - r'<p class="downloadsCounter">([0-9]+)</p>', - webpage, 'view count', fatal=False)) - - return { - 'id': video_id, - 'url': video_url, - 'title': title, - 'ext': ext, - 'filesize_approx': filesize_approx, - 'duration': duration, - 'view_count': view_count, - 'thumbnail': self._og_search_thumbnail(webpage), - }