Compare commits

..

No commits in common. "d426a92a60ba9b6eb01256d3dcad4dcbfecd742c" and "34b5b2010774fab2cb8984c720fcd7c62110669a" have entirely different histories.

2 changed files with 9 additions and 84 deletions

View File

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

View File

@ -1,11 +1,11 @@
# coding: utf-8
from __future__ import unicode_literals
import json
import re
from .common import InfoExtractor
from ..utils import ExtractorError
from ..utils import (
ExtractorError,
)
class NPOIE(InfoExtractor):
@ -80,9 +80,11 @@ class NPOIE(InfoExtractor):
product_id = entry.get('productId')
title = entry.get('title')
synopsis = entry.get('synopsis', {})
description = (synopsis.get('long')
or synopsis.get('short')
or synopsis.get('brief'))
description = (
synopsis.get('long')
or synopsis.get('short')
or synopsis.get('brief')
)
thumbnails = entry.get('images')
for thumbnail_entry in thumbnails:
if 'url' in thumbnail_entry:
@ -129,9 +131,6 @@ class BNNVaraIE(NPOIE):
IE_NAME = 'bnnvara'
IE_DESC = 'bnnvara.nl'
_VALID_URL = r'https?://(?:www\.)?bnnvara\.nl/videos/[0-9]*'
_TESTS = [{
'url': 'https://www.bnnvara.nl/videos/27455',
}]
def _real_extract(self, url):
url = url.rstrip('/')
@ -162,77 +161,3 @@ class BNNVaraIE(NPOIE):
'formats': formats,
'thumbnail': media.get('data', {}).get('player', {}).get('image').get('url'),
}
class ONIE(NPOIE):
IE_NAME = 'on'
IE_DESC = 'ongehoordnederland.tv'
_VALID_URL = r'https?://(?:www\.)?ongehoordnederland.tv/.*'
_TESTS = [{
'url': 'https://ongehoordnederland.tv/2024/03/01/korte-clips/heeft-preppen-zin-betwijfel-dat-je-daar-echt-iets-aan-zult-hebben-bij-oorlog-lydia-daniel/',
}]
def _real_extract(self, url):
video_id = url.rstrip('/').split('/')[-1]
page, _ = self._download_webpage_handle(url, video_id)
results = re.findall("page: '(.+)'", page)
formats = []
for result in results:
formats.extend(self._download_by_product_id(result, video_id))
if not formats:
raise ExtractorError('Could not find a POMS product id in the provided URL.')
return {
'id': video_id,
'title': video_id,
'formats': formats,
}
class VPROIE(NPOIE):
IE_NAME = 'vpro'
IE_DESC = 'vpro.nl'
_VALID_URL = r'https?://(?:www\.)?vpro.nl/.*'
_TESTS = [{
'url': 'https://www.vpro.nl/programmas/tegenlicht/kijk/afleveringen/2015-2016/offline-als-luxe.html',
}]
def _real_extract(self, url):
video_id = url.rstrip('/').split('/')[-1]
page, _ = self._download_webpage_handle(url, video_id)
results = re.findall('data-media-id="(.+_.+)"\s', page)
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.')
return {
'id': video_id,
'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,
}