From 3c6058e024a5c94ef45da55fdb6f9d6408d1684c Mon Sep 17 00:00:00 2001 From: wawxxjm Date: Mon, 9 Dec 2019 02:08:15 -0500 Subject: [PATCH 01/12] Add files via upload fixed issue #12363 --- test/test_download.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test_download.py b/test/test_download.py index ebe820dfc..7204c67f6 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -56,9 +56,9 @@ class YoutubeDL(youtube_dl.YoutubeDL): return super(YoutubeDL, self).process_info(info_dict) -def _file_md5(fn): +def _file_sha256(fn): with open(fn, 'rb') as f: - return hashlib.md5(f.read()).hexdigest() + return hashlib.sha256(f.read()).hexdigest() defs = gettestcases() @@ -223,9 +223,9 @@ def generator(test_case, tname): 'Expected %s to be at least %s, but it\'s only %s ' % (tc_filename, format_bytes(expected_minsize), format_bytes(got_fsize))) - if 'md5' in tc: - md5_for_file = _file_md5(tc_filename) - self.assertEqual(tc['md5'], md5_for_file) + if 'sha256' in tc: + sha256_for_file = _file_sha256(tc_filename) + self.assertEqual(tc['sha256'], sha256_for_file) # Finally, check test cases' data again but this time against # extracted data from info JSON file written during processing info_json_fn = os.path.splitext(tc_filename)[0] + '.info.json' From f9d5ba2d1748b1e281a954fdc0c621d1935fd82b Mon Sep 17 00:00:00 2001 From: wawxxjm Date: Mon, 9 Dec 2019 02:09:23 -0500 Subject: [PATCH 02/12] Add files via upload added some other test cases --- youtube_dl/extractor/academicearth.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/academicearth.py b/youtube_dl/extractor/academicearth.py index 34095501c..73adc76aa 100644 --- a/youtube_dl/extractor/academicearth.py +++ b/youtube_dl/extractor/academicearth.py @@ -8,7 +8,7 @@ from .common import InfoExtractor class AcademicEarthCourseIE(InfoExtractor): _VALID_URL = r'^https?://(?:www\.)?academicearth\.org/playlists/(?P[^?#/]+)' IE_NAME = 'AcademicEarth:Course' - _TEST = { + _TESTS = [{ 'url': 'http://academicearth.org/playlists/laws-of-nature/', 'info_dict': { 'id': 'laws-of-nature', @@ -16,7 +16,23 @@ class AcademicEarthCourseIE(InfoExtractor): 'description': 'Introduce yourself to the laws of nature with these free online college lectures from Yale, Harvard, and MIT.', }, 'playlist_count': 3, - } + }, { + 'url': "https://academicearth.org/playlists/first-day-of-freshman-year/", + 'info_dict': { + 'id': 'first-day-of-freshman-year', + 'title': 'FIRST DAY OF FRESHMAN YEAR', + 'description': 'Relive the first day of your freshman year with a series of first lectures from introductory college courses at MIT, Yale, and Stanford.' + }, + 'playlist_count': 3, + }, { + 'url': 'https://academicearth.org/playlists/financial-crisis', + 'info_dict': { + 'id': 'financial-crisis', + 'title': 'UNDERSTANDING THE FINANCIAL CRISIS', + 'description': 'Expert perspectives on the Financial Crisis and how to manage it.' + }, + 'playlist_count': 7, + }] def _real_extract(self, url): playlist_id = self._match_id(url) From 209c18d4d191c762c962e95c3bf4068768255dd0 Mon Sep 17 00:00:00 2001 From: wawxxjm Date: Mon, 9 Dec 2019 02:10:44 -0500 Subject: [PATCH 03/12] Add files via upload --- akvideo.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 akvideo.py diff --git a/akvideo.py b/akvideo.py new file mode 100644 index 000000000..bc7ebfa8d --- /dev/null +++ b/akvideo.py @@ -0,0 +1,37 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor +class AKVideoIE(InfoExtractor): + _VALID_URL = r'https?://akvideo\.stream/video/(?P\w+)' + _TEST = { + 'url': 'https://akvideo.stream/video/0bvtm479w9iw#', + 'info_dic': { + 'id': '0bvtm479w9iw#', + 'ext': 'mp4', + 'title': 'TEST_VIDEO-C0DPdy98e4c' + } + } + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + title = '' + formats = [] + videoinfo = re.findall(r'download_video\(\'' + video_id + '\',\'(\w)\',\'(.*)\'\)".*(\d+)x(\d+)', webpage) + for info in videoinfo: + webpage = self._download_webpage('https://akvideo.stream/dl?op=download_orig&id=' + video_id + '&mode=' + info[0] + '&hash=' + info[1], video_id) + + movie_url = re.findall(r' Date: Mon, 9 Dec 2019 02:11:39 -0500 Subject: [PATCH 04/12] Add files via upload --- vidello.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 vidello.py diff --git a/vidello.py b/vidello.py new file mode 100644 index 000000000..df3b554c1 --- /dev/null +++ b/vidello.py @@ -0,0 +1,44 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor + +from ..utils import ( + clean_html +) + + +class VidelloIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?embed.vidello\.com/[0-9]/(?P[a-zA-Z0-9]+)/player.html' + _TEST = { + 'url': 'https://embed.vidello.com/2/t1umm637xb1ylgw4/player.html', + 'md5': '7a4d76ac74ef7724af4c6c3ecb5e0042', + 'info_dict': { + 'id': 't1umm637xb1ylgw4', + 'ext': 'mp4', + 'title': 'Vidello Hosting & Marketing', + 'description': "Start marketing your videos more effectively on \x03the web utilising vidello's premium hosting, streaming, \x03analytics & marketing features to grow your \x03online business fast." + } + } + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + + vidello_settings = self._parse_json(self._search_regex( + r'vidello_' + video_id + '_settings\s*=\s*({.+});', webpage, 'vidello settings'), video_id) + + video_url = "" + video_sources = vidello_settings.get('player').get('clip').get('sources') or {} + for curr_entry in video_sources: + if curr_entry['type'] == "video/mp4": + video_url = "http://" + curr_entry["src"][2:] + title = vidello_settings.get('cta')[0].get('values').get('product_title') + description = clean_html(vidello_settings.get('cta')[0].get('values').get('product_desc')) + + return { + 'id': video_id, + 'title': title, + 'description': description, + 'url': video_url + } \ No newline at end of file From b506791131d5774d21262263277bf31d445582f5 Mon Sep 17 00:00:00 2001 From: wawxxjm Date: Mon, 9 Dec 2019 02:12:55 -0500 Subject: [PATCH 05/12] Add files via upload added some imports for new extractors --- youtube_dl/extractor/extractors.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index fd93730fa..96b7fb21c 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -34,8 +34,10 @@ from .aenetworks import ( ) from .afreecatv import AfreecaTVIE from .airmozilla import AirMozillaIE +from .akvideo import AKVideoIE from .aljazeera import AlJazeeraIE from .alphaporno import AlphaPornoIE +from .alphavoice import AlphaVoiceIE from .amcnetworks import AMCNetworksIE from .americastestkitchen import AmericasTestKitchenIE from .animeondemand import AnimeOnDemandIE @@ -511,6 +513,7 @@ from .kickstarter import KickStarterIE from .kinja import KinjaEmbedIE from .kinopoisk import KinoPoiskIE from .konserthusetplay import KonserthusetPlayIE +from .kontrtube import KontrTubeIE from .krasview import KrasViewIE from .ku6 import Ku6IE from .kusi import KUSIIE @@ -1282,6 +1285,7 @@ from .vice import ( from .vidbit import VidbitIE from .viddler import ViddlerIE from .videa import VideaIE +from .vidello import VidelloIE from .videodetective import VideoDetectiveIE from .videofyme import VideofyMeIE from .videomore import ( @@ -1289,6 +1293,7 @@ from .videomore import ( VideomoreVideoIE, VideomoreSeasonIE, ) +from .videopremium import VideoPremiumIE from .videopress import VideoPressIE from .vidio import VidioIE from .vidlii import VidLiiIE From a8cbd6f510b7978abb5337fdb7ccf89d7b8f5006 Mon Sep 17 00:00:00 2001 From: wawxxjm Date: Mon, 9 Dec 2019 02:32:36 -0500 Subject: [PATCH 06/12] Update akvideo.py --- akvideo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/akvideo.py b/akvideo.py index bc7ebfa8d..7af9e8ea3 100644 --- a/akvideo.py +++ b/akvideo.py @@ -34,4 +34,5 @@ class AKVideoIE(InfoExtractor): 'title': title, 'description': title, 'formats': formats - } \ No newline at end of file + } + From 9097d91f5cd0a210bd47e30f0bc2b61ce031a483 Mon Sep 17 00:00:00 2001 From: wawxxjm Date: Mon, 9 Dec 2019 02:39:06 -0500 Subject: [PATCH 07/12] Update vidello.py --- vidello.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vidello.py b/vidello.py index df3b554c1..ac3e87db3 100644 --- a/vidello.py +++ b/vidello.py @@ -41,4 +41,5 @@ class VidelloIE(InfoExtractor): 'title': title, 'description': description, 'url': video_url - } \ No newline at end of file + } + From f3d63d1fd8af40101851e97e0f45f95bef886f0b Mon Sep 17 00:00:00 2001 From: wawxxjm Date: Mon, 9 Dec 2019 02:46:04 -0500 Subject: [PATCH 08/12] Update extractors.py --- youtube_dl/extractor/extractors.py | 1 - 1 file changed, 1 deletion(-) diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 96b7fb21c..0f3247d82 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -37,7 +37,6 @@ from .airmozilla import AirMozillaIE from .akvideo import AKVideoIE from .aljazeera import AlJazeeraIE from .alphaporno import AlphaPornoIE -from .alphavoice import AlphaVoiceIE from .amcnetworks import AMCNetworksIE from .americastestkitchen import AmericasTestKitchenIE from .animeondemand import AnimeOnDemandIE From da79ffa73cfd06d57209c930fecacecb8f051fa0 Mon Sep 17 00:00:00 2001 From: wawxxjm Date: Mon, 9 Dec 2019 02:51:09 -0500 Subject: [PATCH 09/12] Update vidello.py --- vidello.py | 1 - 1 file changed, 1 deletion(-) diff --git a/vidello.py b/vidello.py index ac3e87db3..501f3f1c1 100644 --- a/vidello.py +++ b/vidello.py @@ -42,4 +42,3 @@ class VidelloIE(InfoExtractor): 'description': description, 'url': video_url } - From 52ad72383eed2350cebfbff22ca0cb6ff74ccc3e Mon Sep 17 00:00:00 2001 From: wawxxjm Date: Mon, 9 Dec 2019 02:52:02 -0500 Subject: [PATCH 10/12] Update vidello.py --- vidello.py | 1 + 1 file changed, 1 insertion(+) diff --git a/vidello.py b/vidello.py index 501f3f1c1..ac3e87db3 100644 --- a/vidello.py +++ b/vidello.py @@ -42,3 +42,4 @@ class VidelloIE(InfoExtractor): 'description': description, 'url': video_url } + From 821bf0a6faaa3051c1fa649edca4f5ee7cad8536 Mon Sep 17 00:00:00 2001 From: wawxxjm Date: Mon, 9 Dec 2019 02:52:29 -0500 Subject: [PATCH 11/12] Delete vidello.py --- vidello.py | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 vidello.py diff --git a/vidello.py b/vidello.py deleted file mode 100644 index ac3e87db3..000000000 --- a/vidello.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 -from __future__ import unicode_literals - -from .common import InfoExtractor - -from ..utils import ( - clean_html -) - - -class VidelloIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?embed.vidello\.com/[0-9]/(?P[a-zA-Z0-9]+)/player.html' - _TEST = { - 'url': 'https://embed.vidello.com/2/t1umm637xb1ylgw4/player.html', - 'md5': '7a4d76ac74ef7724af4c6c3ecb5e0042', - 'info_dict': { - 'id': 't1umm637xb1ylgw4', - 'ext': 'mp4', - 'title': 'Vidello Hosting & Marketing', - 'description': "Start marketing your videos more effectively on \x03the web utilising vidello's premium hosting, streaming, \x03analytics & marketing features to grow your \x03online business fast." - } - } - - def _real_extract(self, url): - video_id = self._match_id(url) - webpage = self._download_webpage(url, video_id) - - vidello_settings = self._parse_json(self._search_regex( - r'vidello_' + video_id + '_settings\s*=\s*({.+});', webpage, 'vidello settings'), video_id) - - video_url = "" - video_sources = vidello_settings.get('player').get('clip').get('sources') or {} - for curr_entry in video_sources: - if curr_entry['type'] == "video/mp4": - video_url = "http://" + curr_entry["src"][2:] - title = vidello_settings.get('cta')[0].get('values').get('product_title') - description = clean_html(vidello_settings.get('cta')[0].get('values').get('product_desc')) - - return { - 'id': video_id, - 'title': title, - 'description': description, - 'url': video_url - } - From d802aa5c39ca34312bbe150782879d4112089cf2 Mon Sep 17 00:00:00 2001 From: wawxxjm Date: Mon, 9 Dec 2019 02:53:34 -0500 Subject: [PATCH 12/12] Update extractors.py --- youtube_dl/extractor/extractors.py | 1 - 1 file changed, 1 deletion(-) diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 0f3247d82..e79fb15c2 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -1284,7 +1284,6 @@ from .vice import ( from .vidbit import VidbitIE from .viddler import ViddlerIE from .videa import VideaIE -from .vidello import VidelloIE from .videodetective import VideoDetectiveIE from .videofyme import VideofyMeIE from .videomore import (