Compare commits

..

No commits in common. "6de650f51fc9da6ae8a261b3f57e26f4ec78a2d1" and "179c8b06b64af21787b27ceb617b44dde96ef7f5" have entirely different histories.

View File

@ -5,7 +5,7 @@ import json
import re
from .common import InfoExtractor
from ..utils import ExtractorError, join_nonempty, traverse_obj
from ..utils import ExtractorError
class NPOIE(InfoExtractor):
@ -95,7 +95,7 @@ class NPOIE(InfoExtractor):
},
fatal=False,
)
stream_url = traverse_obj(stream_link, ('stream', 'streamURL'))
stream_url = stream_link.get('stream', {}).get('streamURL')
formats.extend(self._extract_mpd_formats(stream_url, slug, mpd_id='dash', fatal=False))
return formats
@ -140,9 +140,9 @@ class BNNVaraIE(NPOIE):
return {
'id': product_id,
'title': traverse_obj(media, ('data', 'player', 'title')),
'title': media.get('data', {}).get('player', {}).get('title'),
'formats': formats,
'thumbnail': traverse_obj(media, ('data', 'player', 'image', 'url')),
'thumbnail': media.get('data', {}).get('player', {}).get('image').get('url'),
}
@ -160,7 +160,7 @@ class ONIE(NPOIE):
def _real_extract(self, url):
video_id = url.rstrip('/').split('/')[-1]
page = self._download_webpage(url, video_id)
page, _ = self._download_webpage_handle(url, video_id)
results = re.findall("page: '(.+)'", page)
formats = []
for result in results:
@ -241,7 +241,7 @@ class SchoolTVIE(NPOIE):
return {
'id': video_id,
'title': join_nonempty('title', 'subtitle', from_dict=metadata),
'title': metadata.get('title', '') + ' - ' + metadata.get('subtitle', ''),
'description': metadata.get('description') or metadata.get('short_description'),
'formats': formats,
}