From 733f2633be5f5b4fd5291ff41182bf8f2db05ee7 Mon Sep 17 00:00:00 2001 From: Sergey Alirzaev Date: Thu, 24 Dec 2015 02:18:57 +0300 Subject: [PATCH] [gogoanime] Add new extractor --- youtube_dl/extractor/__init__.py | 1 + youtube_dl/extractor/gogoanime.py | 44 +++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 youtube_dl/extractor/gogoanime.py diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py index 3b541a538..e67d0e410 100644 --- a/youtube_dl/extractor/__init__.py +++ b/youtube_dl/extractor/__init__.py @@ -234,6 +234,7 @@ from .globo import ( GloboArticleIE, ) from .godtube import GodTubeIE +from .gogoanime import GoGoAnimeIE from .goldenmoustache import GoldenMoustacheIE from .golem import GolemIE from .googledrive import GoogleDriveIE diff --git a/youtube_dl/extractor/gogoanime.py b/youtube_dl/extractor/gogoanime.py new file mode 100644 index 000000000..0a6369b70 --- /dev/null +++ b/youtube_dl/extractor/gogoanime.py @@ -0,0 +1,44 @@ +# coding: utf-8 +from __future__ import unicode_literals + +import re + +from .common import InfoExtractor + + +class GoGoAnimeIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?gogoanime\.tv/(?P[^/]+)' + _TEST = { + 'url': 'http://gogoanime.tv/kino-no-tabi-the-beautiful-world-episode-6', + 'md5': 'd5da1bc82a1bf61990b93b7ed386683b', + 'info_dict': { + 'id': 'kino-no-tabi-the-beautiful-world-episode-6', + 'ext': 'mp4', + 'title': 'Kino no Tabi: The Beautiful World Episode 6 English Subbed', + } + } + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + + title = self._html_search_regex(r'

(.+?) at gogoanime

', webpage, 'title') + mobj = re.search(r'