From e0cebae33e02a7672260c76540f0a45830f90b97 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Sep 2016 00:29:12 +0530 Subject: [PATCH] hoofoot.com extractor Add new extractor --- youtube_dl/extractor/__init__.py | 1 + youtube_dl/extractor/hoofoot.py | 47 ++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 youtube_dl/extractor/hoofoot.py diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py index a73a1317e..0b68b1f89 100644 --- a/youtube_dl/extractor/__init__.py +++ b/youtube_dl/extractor/__init__.py @@ -22,6 +22,7 @@ from .aparat import AparatIE from .appleconnect import AppleConnectIE from .appletrailers import AppleTrailersIE from .archiveorg import ArchiveOrgIE +from .hoofoot import HooFootIE from .ard import ( ARDIE, ARDMediathekIE, diff --git a/youtube_dl/extractor/hoofoot.py b/youtube_dl/extractor/hoofoot.py new file mode 100644 index 000000000..0ca373ce5 --- /dev/null +++ b/youtube_dl/extractor/hoofoot.py @@ -0,0 +1,47 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor +from ..compat import ( + compat_urllib_parse, + compat_urllib_parse, + compat_urllib_parse_unquote, + compat_urllib_request, + compat_urlparse, +) + +class HooFootIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?hoofoot\.com/(.*)' + _TEST = { + 'url': 'http://hoofoot.com/?match=Real_Madrid_1_-_1_Villarreal_2016_09_21', + 'info_dict': { + 'id': 'IcQz', + 'ext': 'mp4', + 'title': 'extended rm', + 'description': None, + 'thumbnail': 'https://d1wst0behutosd.cloudfront.net/videos/10759353/thumb.jpg?v2r1474489699', + 'timestamp': 1474489688, + 'age_limit': 0, + 'duration': 918.33, + 'view_count': int, + 'like_count': int, + 'comment_count': int, + 'upload_date': '20160921', + }, + } + + + + + def _real_extract(self, url): + # # video_id = self._match_id(url) + parsed = compat_urllib_parse.urlparse(url) + match = compat_urllib_parse.parse_qs(parsed.query)['match'] + video_id = "" + if(len(match) > 0): + video_id = match[0] + webpage = self._download_webpage(url, video_id) + video_url = self._search_regex( + r'