Compare commits

...

13 Commits

Author SHA1 Message Date
Inias Peeters
850a27d309
Merge 0f0a0b92892803f9f5c8402444dfb5dbb4e2e640 into 4e714f9df1ed2cccd51df60d45ff5504abe827b7 2025-03-29 14:39:43 +00:00
dirkf
4e714f9df1 [Misc] Correct [_]IE_DESC/NAME in a few IEs
* thx seproDev, yt-dlp/yt-dlp/pull/12694/commits/ae69e3c
* also add documenting comment in `InfoExtractor`
2025-03-26 12:47:19 +00:00
dirkf
c1ea7f5a24 [ITV] Mark ITVX not working
* update old shim
* correct [_]IE_DESC
2025-03-26 12:17:49 +00:00
Inias Peeters
0f0a0b9289 Merge branch 'master' into ffmpeg_out_override 2022-03-28 16:24:26 +02:00
Inias Peeters
5283ae43ad
Update README.md 2022-03-28 16:14:05 +02:00
Inias Peeters
d84d1237f1
Merge upstream 2022-03-28 16:00:21 +02:00
Inias Peeters
433f671ee0
Update readme and supported sites 2022-03-22 13:30:46 +01:00
Inias Peeters
cc1f990ca2 Merge branch 'ffmpeg_out_override' of github.com:IniasP/youtube-dl into ffmpeg_out_override 2022-03-15 12:50:30 +01:00
Inias Peeters
2025ee3574
Merge branch 'ffmpeg_out_override' 2021-11-05 01:23:05 +01:00
Inias Peeters
bea7488c6f
[downloader/ffmpeg] Add override option for FFmpeg output args 2021-11-05 01:03:40 +01:00
Inias Peeters
c2d325eafd
[kuleuven_live] Add new extractor 2021-11-05 00:28:35 +01:00
Inias Peeters
6c75cd3c68
Experimental override option for output args 2021-10-29 14:44:59 +02:00
Inias Peeters
44a7c656a3
Add livestream.kuleuven.be extractor 2021-10-29 12:02:41 +02:00
12 changed files with 59 additions and 17 deletions

View File

@ -1,5 +1,8 @@
[![Build Status](https://github.com/ytdl-org/youtube-dl/workflows/CI/badge.svg)](https://github.com/ytdl-org/youtube-dl/actions?query=workflow%3ACI)
# In this fork
This fork adds an extractor for recording lectures from a https://livestream.kuleuven.be/ stream.
# youtube-dl
youtube-dl - download videos from youtube.com or other video platforms
@ -238,6 +241,8 @@ Alternatively, refer to the [developer instructions](#developer-instructions) fo
url,ffmpeg,httpie,wget
--external-downloader-args ARGS Give these arguments to the external
downloader
--ffmpeg-out-override ARGS Give these arguments to the ffmpeg
instead of `-c copy`
## Filesystem Options:
-a, --batch-file FILE File containing URLs to download ('-'

View File

@ -433,6 +433,7 @@
- **KonserthusetPlay**
- **KrasView**: Красвью
- **Ku6**
- **KULLive**
- **KUSI**
- **kuwo:album**: 酷我音乐 - 专辑
- **kuwo:category**: 酷我音乐 - 分类

View File

@ -312,6 +312,9 @@ def _real_main(argv=None):
postprocessor_args = None
if opts.postprocessor_args:
postprocessor_args = compat_shlex_split(opts.postprocessor_args)
ffmpeg_out_override = None
if opts.ffmpeg_out_override:
ffmpeg_out_override = compat_shlex_split(opts.ffmpeg_out_override)
match_filter = (
None if opts.match_filter is None
else match_filter_func(opts.match_filter))
@ -429,6 +432,7 @@ def _real_main(argv=None):
'hls_prefer_native': opts.hls_prefer_native,
'hls_use_mpegts': opts.hls_use_mpegts,
'external_downloader_args': external_downloader_args,
'ffmpeg_out_override': ffmpeg_out_override,
'postprocessor_args': postprocessor_args,
'cn_verification_proxy': opts.cn_verification_proxy,
'geo_verification_proxy': opts.geo_verification_proxy,

View File

@ -469,7 +469,10 @@ class FFmpegFD(ExternalFD):
elif isinstance(conn, compat_str):
args += ['-rtmp_conn', conn]
args += ['-i', url, '-c', 'copy']
args += ['-i', url]
ffmpeg_out_override = self.params.get('ffmpeg_out_override')
args += ffmpeg_out_override if ffmpeg_out_override else ['-c', 'copy']
if self.params.get('test', False):
args += ['-fs', compat_str(self._TEST_FILE_SIZE)]

View File

@ -32,7 +32,7 @@ class BokeCCBaseIE(InfoExtractor):
class BokeCCIE(BokeCCBaseIE):
_IE_DESC = 'CC视频'
IE_DESC = 'CC视频'
_VALID_URL = r'https?://union\.bokecc\.com/playvideo\.bo\?(?P<query>.*)'
_TESTS = [{

View File

@ -9,7 +9,7 @@ from ..utils import (
class CloudyIE(InfoExtractor):
_IE_DESC = 'cloudy.ec'
IE_DESC = 'cloudy.ec'
_VALID_URL = r'https?://(?:www\.)?cloudy\.ec/(?:v/|embed\.php\?.*?\bid=)(?P<id>[A-Za-z0-9]+)'
_TESTS = [{
'url': 'https://www.cloudy.ec/v/af511e2527aac',

View File

@ -422,6 +422,8 @@ class InfoExtractor(object):
_GEO_COUNTRIES = None
_GEO_IP_BLOCKS = None
_WORKING = True
# supply this in public subclasses: used in supported sites list, etc
# IE_DESC = 'short description of IE'
def __init__(self, downloader=None):
"""Constructor. Receives an optional downloader."""

View File

@ -576,6 +576,7 @@ from .konserthusetplay import KonserthusetPlayIE
from .krasview import KrasViewIE
from .kth import KTHIE
from .ku6 import Ku6IE
from .kuleuven_live import KULLiveIE
from .kusi import KUSIIE
from .kuwo import (
KuwoIE,

View File

@ -35,15 +35,6 @@ from ..utils import (
class ITVBaseIE(InfoExtractor):
def _search_nextjs_data(self, webpage, video_id, **kw):
transform_source = kw.pop('transform_source', None)
fatal = kw.pop('fatal', True)
return self._parse_json(
self._search_regex(
r'''<script\b[^>]+\bid=('|")__NEXT_DATA__\1[^>]*>(?P<js>[^<]+)</script>''',
webpage, 'next.js data', group='js', fatal=fatal, **kw),
video_id, transform_source=transform_source, fatal=fatal)
def __handle_request_webpage_error(self, err, video_id=None, errnote=None, fatal=True):
if errnote is False:
return False
@ -109,7 +100,9 @@ class ITVBaseIE(InfoExtractor):
class ITVIE(ITVBaseIE):
_VALID_URL = r'https?://(?:www\.)?itv\.com/(?:(?P<w>watch)|hub)/[^/]+/(?(w)[\w-]+/)(?P<id>\w+)'
_IE_DESC = 'ITVX'
IE_DESC = 'ITVX'
_WORKING = False
_TESTS = [{
'note': 'Hub URLs redirect to ITVX',
'url': 'https://www.itv.com/hub/liar/2a4547a0012',
@ -270,7 +263,7 @@ class ITVIE(ITVBaseIE):
'ext': determine_ext(href, 'vtt'),
})
next_data = self._search_nextjs_data(webpage, video_id, fatal=False, default='{}')
next_data = self._search_nextjs_data(webpage, video_id, fatal=False, default={})
video_data.update(traverse_obj(next_data, ('props', 'pageProps', ('title', 'episode')), expected_type=dict)[0] or {})
title = traverse_obj(video_data, 'headerTitle', 'episodeTitle')
info = self._og_extract(webpage, require_title=not title)
@ -323,7 +316,7 @@ class ITVIE(ITVBaseIE):
class ITVBTCCIE(ITVBaseIE):
_VALID_URL = r'https?://(?:www\.)?itv\.com/(?!(?:watch|hub)/)(?:[^/]+/)+(?P<id>[^/?#&]+)'
_IE_DESC = 'ITV articles: News, British Touring Car Championship'
IE_DESC = 'ITV articles: News, British Touring Car Championship'
_TESTS = [{
'note': 'British Touring Car Championship',
'url': 'https://www.itv.com/btcc/articles/btcc-2018-all-the-action-from-brands-hatch',

View File

@ -0,0 +1,29 @@
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class KULLiveIE(InfoExtractor):
_VALID_URL = r'(?:(?:https?://(?:www\.)?livestream.kuleuven\.be/\?pin=)|kulive:)(?P<id>[0-9]+)'
def _real_extract(self, url):
pin = self._match_id(url)
json_res = self._download_json(
"https://icts-p-toledo-streaming-video-live-backend.cloud.icts.kuleuven.be/api/viewers/" + pin,
pin,
'Requesting stream URL',
errnote='The stream with pin %s does not exist or has not started yet' % pin,
fatal=True)
m3u8_url = json_res['streamUrl']
formats = self._extract_m3u8_formats(m3u8_url, pin, 'mp4')
return {
'id': pin,
'title': 'kul-stream',
'is_live': True,
'formats': formats,
}

View File

@ -47,7 +47,7 @@ class SenateISVPIE(InfoExtractor):
['vetaff', '76462', 'http://vetaff-f.akamaihd.net'],
['arch', '', 'http://ussenate-f.akamaihd.net/']
]
_IE_NAME = 'senate.gov'
IE_NAME = 'senate.gov'
_VALID_URL = r'https?://(?:www\.)?senate\.gov/isvp/?\?(?P<qs>.+)'
_TESTS = [{
'url': 'http://www.senate.gov/isvp/?comm=judiciary&type=live&stt=&filename=judiciary031715&auto_play=false&wmode=transparent&poster=http%3A%2F%2Fwww.judiciary.senate.gov%2Fthemes%2Fjudiciary%2Fimages%2Fvideo-poster-flash-fit.png',

View File

@ -523,6 +523,10 @@ def parseOpts(overrideArguments=None):
'--external-downloader-args',
dest='external_downloader_args', metavar='ARGS',
help='Give these arguments to the external downloader')
downloader.add_option(
'--ffmpeg-out-override',
dest='ffmpeg_out_override', metavar='ARGS',
help='Give these arguments to the ffmpeg instead of `-c copy`')
workarounds = optparse.OptionGroup(parser, 'Workarounds')
workarounds.add_option(