1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-16 14:27:53 +00:00

Re-add Zapp

This commit is contained in:
Bart Broere 2024-03-05 14:04:03 +01:00
parent eb6e396bfb
commit d36d50fe5c
2 changed files with 23 additions and 1 deletions

View File

@ -847,7 +847,7 @@ from .nowness import (
NownessSeriesIE,
)
from .noz import NozIE
from .npo import BNNVaraIE, NPOIE, ONIE
from .npo import BNNVaraIE, NPOIE, ONIE, VPROIE
from .npr import NprIE
from .nrk import (
NRKIE,

View File

@ -204,6 +204,7 @@ class VPROIE(NPOIE):
formats = []
for result in results:
formats.extend(self._download_by_product_id(result, video_id))
break # TODO find a better solution, VPRO pages can have multiple videos embedded
if not formats:
raise ExtractorError('Could not find a POMS product id in the provided URL.')
@ -213,3 +214,24 @@ class VPROIE(NPOIE):
'title': video_id,
'formats': formats,
}
class ZAPPIE(NPOIE):
IE_NAME = 'zapp'
IE_DESC = 'zapp.nl'
_VALID_URL = r'https?://(?:www\.)?zapp.nl/.*'
_TESTS = [{
'url': 'https://www.zapp.nl/programmas/zappsport/gemist/AT_300003973',
}]
def _real_extract(self, url):
video_id = url.rstrip('/').split('/')[-1]
formats = self._download_by_product_id(url, video_id)
return {
'id': video_id,
'title': video_id,
'formats': formats,
}