mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-01-19 07:13:05 +01:00
add cablecasttv extrator
This commit is contained in:
parent
ff38a011d5
commit
4070c00ba7
2 changed files with 56 additions and 0 deletions
|
@ -289,6 +289,7 @@ from .buzzfeed import BuzzFeedIE
|
||||||
from .byutv import BYUtvIE
|
from .byutv import BYUtvIE
|
||||||
from .c56 import C56IE
|
from .c56 import C56IE
|
||||||
from .cableav import CableAVIE
|
from .cableav import CableAVIE
|
||||||
|
from .cablecasttv import CableCastTVIE
|
||||||
from .callin import CallinIE
|
from .callin import CallinIE
|
||||||
from .caltrans import CaltransIE
|
from .caltrans import CaltransIE
|
||||||
from .cam4 import CAM4IE
|
from .cam4 import CAM4IE
|
||||||
|
|
55
yt_dlp/extractor/cablecasttv.py
Normal file
55
yt_dlp/extractor/cablecasttv.py
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
class CableCastTVIE(InfoExtractor):
|
||||||
|
_VALID_URL = r'https://wctv\.wilmette\.com/CablecastPublicSite/show/(?P<id>\d+)'
|
||||||
|
_TESTS = [{
|
||||||
|
'url': 'https://wctv.wilmette.com/CablecastPublicSite/show/532',
|
||||||
|
'md5': 'fc12bce4a9c1335f153500c8fea6e1a8',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '532',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Village Board Meeting 4/24/24',
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
'url': 'https://fyptt.to/10382/beautiful-livestream-tits-and-nipples-slip-from-girls-who-loves-talking-with-their-viewers/',
|
||||||
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
'url': 'https://fyptt.to/120/small-tits-fit-blonde-dancing-naked-at-the-front-door-on-tiktok',
|
||||||
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
'url': 'https://fkbae.to/18',
|
||||||
|
'only_matching': True,
|
||||||
|
}]
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
video_id = self._match_id(url)
|
||||||
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
|
formats = []
|
||||||
|
format_url = self._html_search_regex(r'"embedURL":"([^"]+)"', webpage, 'video URL')
|
||||||
|
format_url = re.sub(r'\\', '', format_url)
|
||||||
|
|
||||||
|
webpage_video = self._download_webpage(format_url, video_id)
|
||||||
|
|
||||||
|
match = re.search(r'(https:\/\/[^"]+\.mp4)', webpage_video)
|
||||||
|
format_url = match.group(1)
|
||||||
|
formats.append({
|
||||||
|
'url': format_url,
|
||||||
|
'format_id': 'default',
|
||||||
|
})
|
||||||
|
|
||||||
|
title = self._html_search_regex(r'<span class="fl-heading-text">(.+?)</span>', webpage, 'title')
|
||||||
|
|
||||||
|
# base_url = re.search(r'^(https?://[a-zA-Z0-9_-]+\.to)', url).group(1)
|
||||||
|
# http_headers = {'Referer': base_url}
|
||||||
|
|
||||||
|
return {
|
||||||
|
'id': video_id,
|
||||||
|
'title': title,
|
||||||
|
'formats': formats,
|
||||||
|
# 'http_headers': http_headers
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue