Compare commits

...

7 Commits

Author SHA1 Message Date
Reinhart Previano Koentjoro
82e78a5dd3
Merge a1ce32fe2a2b2d570e11a25894f2f33e4374bc98 into 3eb8d22ddb8982ca4fb56bb7a8d6517538bf14c6 2025-04-01 11:30:44 +02:00
reinhart1010
a1ce32fe2a Merge remote-tracking branch 'upstream/master' into binustvextractor 2020-12-10 09:03:05 +07:00
Reinhart Previano K
8893a29cb5
Remove test files 2020-03-26 17:56:09 +07:00
Reinhart Previano K
861658d2ea
Remove test file 2020-03-26 17:55:44 +07:00
Reinhart Previano K
9c274b5805
Remove test files 2020-03-26 17:55:25 +07:00
Reinhart Previano Koentjoro
bdb1e0c906 Fix coding conventionsand remove test files 2020-03-26 17:54:17 +07:00
Reinhart Previano Koentjoro
6549db78f2 [binustv] Add new extractor 2020-03-26 17:42:17 +07:00
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,35 @@
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
# BINUS TV uses YouTube to host videos. However, it uses additional private APIs for other features (i.e. comments).
# This script only uses URLs from the BINUS TV Android app share API (https://binus.bedigital.co.id/app/share/video/).
# Videos from the main BINUS TV website (https://www.binus.tv/video/) can still be extracted using generic extractor.
class BinusTVAppIE(InfoExtractor):
_VALID_URL = r'(?:https?://)?(?:www\.)?binus\.bedigital\.co\.id/app/share/video/[^\/]+/[^\/]+/(?P<id>[^/?\0]+)'
_TEST = {
'url': 'https://binus.bedigital.co.id/app/share/video/7/65156/headline-gerakan-stayforus-mulai-menggema-di-laman-media',
'info_dict': {
'id': 'mjH-3DDJLmU',
'ext': 'mp4',
'title': '[Headline] Gerakan #StayForUs Mulai Menggema di Laman Media',
'upload_date': '20200323',
'description': 'md5:a602c6fba2e474a0d5844489fe42f689',
'uploader': 'BINUSTV Channel',
'uploader_id': 'ChannelBINUSTV'
},
}
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id')
webpage = self._download_webpage(url, video_id)
youtube_id = self._search_regex(r'https:\/\/i.ytimg.com\/vi\/([0-9A-Za-z-_]{11})\/default.jpg', webpage, 'youtube_id')
# Returns the YouTube video
return self.url_result(youtube_id, ie='Youtube')

View File

@ -128,6 +128,7 @@ from .bilibili import (
BilibiliAudioAlbumIE,
BiliBiliPlayerIE,
)
from .binustv import BinusTVAppIE
from .biobiochiletv import BioBioChileTVIE
from .bitchute import (
BitChuteIE,