From 51c510ce1ea8d7e0e830573197a14df3b4a53559 Mon Sep 17 00:00:00 2001 From: razzle01 Date: Tue, 5 May 2020 23:24:01 +0200 Subject: [PATCH 1/3] Add CSGOAnime Extractor --- youtube_dl/extractor/csgoanime.py | 34 ++++++++++++++++++++++++++++++ youtube_dl/extractor/extractors.py | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 youtube_dl/extractor/csgoanime.py diff --git a/youtube_dl/extractor/csgoanime.py b/youtube_dl/extractor/csgoanime.py new file mode 100644 index 000000000..a12aeccdc --- /dev/null +++ b/youtube_dl/extractor/csgoanime.py @@ -0,0 +1,34 @@ +# coding: utf-8 +from __future__ import unicode_literals + + +from .common import InfoExtractor + + +class CSGOAnimeIE(InfoExtractor): + _VALID_URL = r'(?:https?://)?(?:www\.)?csgoani\.me/(?P[0-9A-Za-z]+)(?:/[0-9A+Za+z])*' + _TEST = { + 'url': 'https://csgoani.me/valorant', + 'md5': 'feca224e0fd505403206f28da862601d', + 'info_dict': { + 'id': 'valorant', + 'ext': 'webm', + 'title': 'CSGOAnime', + 'uploader': 'thrice', + 'url': 'https://csgoani.me/uploads/alorant.webm' + } + } + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + + video_url = self._og_search_url(webpage) + + return { + 'id': video_id, + 'ext': 'webm', + 'title': 'CSGOAnime', + 'uploader': 'thrice', + 'url': video_url + } \ No newline at end of file diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 4b3092028..35f847ae8 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -1516,3 +1516,5 @@ from .zattoo import ( from .zdf import ZDFIE, ZDFChannelIE from .zingmp3 import ZingMp3IE from .zype import ZypeIE + +from .csgoanime import CSGOAnimeIE \ No newline at end of file From 4ee40279a8a0819832974e9d56a8a13934b0ef59 Mon Sep 17 00:00:00 2001 From: razzle01 Date: Tue, 5 May 2020 23:27:12 +0200 Subject: [PATCH 2/3] [CSGOAnime] Add new extractor --- youtube_dl/extractor/csgoanime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/csgoanime.py b/youtube_dl/extractor/csgoanime.py index a12aeccdc..c6c88a212 100644 --- a/youtube_dl/extractor/csgoanime.py +++ b/youtube_dl/extractor/csgoanime.py @@ -31,4 +31,4 @@ class CSGOAnimeIE(InfoExtractor): 'title': 'CSGOAnime', 'uploader': 'thrice', 'url': video_url - } \ No newline at end of file + } From f6cd7375a9ea5047b7279ff41e6f0cf6a5c184b6 Mon Sep 17 00:00:00 2001 From: razzle01 Date: Tue, 5 May 2020 23:27:12 +0200 Subject: [PATCH 3/3] [CSGOAnime] Add new extractor --- youtube_dl/extractor/csgoanime.py | 2 +- youtube_dl/extractor/extractors.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/csgoanime.py b/youtube_dl/extractor/csgoanime.py index a12aeccdc..c6c88a212 100644 --- a/youtube_dl/extractor/csgoanime.py +++ b/youtube_dl/extractor/csgoanime.py @@ -31,4 +31,4 @@ class CSGOAnimeIE(InfoExtractor): 'title': 'CSGOAnime', 'uploader': 'thrice', 'url': video_url - } \ No newline at end of file + } diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 35f847ae8..b61ece7de 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -1517,4 +1517,4 @@ from .zdf import ZDFIE, ZDFChannelIE from .zingmp3 import ZingMp3IE from .zype import ZypeIE -from .csgoanime import CSGOAnimeIE \ No newline at end of file +from .csgoanime import CSGOAnimeIE