diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 751fc38b6..c52e3a502 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -816,6 +816,7 @@ from .nintendo import NintendoIE from .njpwworld import NJPWWorldIE from .nobelprize import NobelPrizeIE from .nonktube import NonkTubeIE +from .noodledude import NoodleDudeIE from .noovo import NoovoIE from .normalboots import NormalbootsIE from .nosvideo import NosVideoIE diff --git a/youtube_dl/extractor/noodledude.py b/youtube_dl/extractor/noodledude.py new file mode 100644 index 000000000..d79dbddde --- /dev/null +++ b/youtube_dl/extractor/noodledude.py @@ -0,0 +1,70 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor + +import re +import json + +class NoodleDudeIE(InfoExtractor): + IE_NAME = 'NoodleDude' + _VALID_URL = r'https?://(www\.)?noodledude\.io/videos/(?P[0-9a-zA-Z_-]+)' + _TEST = { + 'url': 'https://www.noodledude.io/videos/kawaii-vs-goth', + 'md5': '9d3465ea49d16860a531035517ea8aec', + 'info_dict': { + 'id': 'kawaii-vs-goth', + 'ext': 'mp4', + 'title': 'Kawaii VS Goth', + 'thumbnail': r're:^https?://.*\.jpg$', + 'description': 'md5:f16fef1f758a4dc38041bd6648b9d3b2', + # TODO more properties, either as: + # * A value + # * MD5 checksum; start the string with md5: + # * A regular expression; start the string with re: + # * Any Python type (for example int or float) + } + } + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id, headers={'Referer': 'https://www.noodledude.io/'}) + + #with open('webpage.tmp', 'w') as f: + #f.write(webpage) + + # TODO more code goes here, for example ... + title = self._html_search_regex(r'

(.+?)

', webpage, 'title') + description = self._html_search_meta('description', webpage, 'decription') + + print('Title:', title) + print('Description:', description) + + iframe_url = self._search_regex(r']+id="uploader"[^>]*>([^<]+)<', webpage, 'uploader', fatal=False), + # TODO more properties (see youtube_dl/extractor/common.py) + }