mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-01-10 21:40:11 +09:00
Compare commits
5 Commits
8b84b623b4
...
9955367810
Author | SHA1 | Date | |
---|---|---|---|
|
9955367810 | ||
|
c3f756cd79 | ||
|
6128cae342 | ||
|
cfc78f02a4 | ||
|
4d3e895708 |
@ -636,6 +636,7 @@ from .linkedin import (
|
|||||||
LinkedInLearningCourseIE,
|
LinkedInLearningCourseIE,
|
||||||
)
|
)
|
||||||
from .linuxacademy import LinuxAcademyIE
|
from .linuxacademy import LinuxAcademyIE
|
||||||
|
from .listennow import ListennowIE
|
||||||
from .litv import LiTVIE
|
from .litv import LiTVIE
|
||||||
from .livejournal import LiveJournalIE
|
from .livejournal import LiveJournalIE
|
||||||
from .livestream import (
|
from .livestream import (
|
||||||
@ -1012,6 +1013,7 @@ from .radiode import RadioDeIE
|
|||||||
from .radiojavan import RadioJavanIE
|
from .radiojavan import RadioJavanIE
|
||||||
from .radiobremen import RadioBremenIE
|
from .radiobremen import RadioBremenIE
|
||||||
from .radiofrance import RadioFranceIE
|
from .radiofrance import RadioFranceIE
|
||||||
|
from .radioplay import RadioplayPodcastIE
|
||||||
from .rai import (
|
from .rai import (
|
||||||
RaiPlayIE,
|
RaiPlayIE,
|
||||||
RaiPlayLiveIE,
|
RaiPlayLiveIE,
|
||||||
|
28
youtube_dl/extractor/listennow.py
Normal file
28
youtube_dl/extractor/listennow.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
|
||||||
|
class ListennowIE(InfoExtractor):
|
||||||
|
_VALID_URL = r'https?://(?:[^\.]+\.)?listennow\.link/(?P<id>\d+)'
|
||||||
|
|
||||||
|
_TEST = {
|
||||||
|
'url': 'https://radionorge.listennow.link/10279676',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '2035659',
|
||||||
|
'ext': 'mp3',
|
||||||
|
'title': 'Best of Høsten 2020',
|
||||||
|
'description': 'md5:701b09a2bcf9a75b6bfd8a27f359dcfa',
|
||||||
|
'timestamp': 1603429200,
|
||||||
|
'upload_date': '20201023',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
video_id = self._match_id(url)
|
||||||
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
url = self._search_regex(
|
||||||
|
r'desktopUrl\s*:\s*\'([^\']+)\'', webpage,
|
||||||
|
'redirect', video_id)
|
||||||
|
return self.url_result(url)
|
47
youtube_dl/extractor/radioplay.py
Normal file
47
youtube_dl/extractor/radioplay.py
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
from ..utils import (
|
||||||
|
int_or_none,
|
||||||
|
js_to_json,
|
||||||
|
parse_iso8601,
|
||||||
|
unified_strdate,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class RadioplayPodcastIE(InfoExtractor):
|
||||||
|
_VALID_URL = r'https?://(?:www\.)?radioplay\.(?:se|no)/podcast/[^/]+/[^/]+/(?P<id>\d+)'
|
||||||
|
|
||||||
|
_TEST = {
|
||||||
|
'url': 'https://radioplay.se/podcast/lilla-my/lyssna/2001126',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '2001126',
|
||||||
|
'ext': 'mp3',
|
||||||
|
'title': 'Kaktus till läraren',
|
||||||
|
'description': 'Lilla My ska köpa en "blomma" till sin lärare.',
|
||||||
|
'timestamp': 1549898100,
|
||||||
|
'upload_date': '20190211',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
video_id = self._match_id(url)
|
||||||
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
player = self._parse_json(self._search_regex(
|
||||||
|
r'window\.__PRELOADED_STATE__\s*=\s*({.+})', webpage,
|
||||||
|
'player', default='{}'), video_id, transform_source=js_to_json)
|
||||||
|
video_info = player['player']['nowPlaying']
|
||||||
|
|
||||||
|
return {
|
||||||
|
'url': video_info['PodcastExtMediaUrl'],
|
||||||
|
'id': video_id,
|
||||||
|
'title': video_info['PodcastTitle'],
|
||||||
|
'description': video_info.get('PodcastDescription'),
|
||||||
|
'thumbnail': video_info.get('PodcastImageUrl'),
|
||||||
|
'release_date': unified_strdate(video_info.get('PodcastPublishDate')),
|
||||||
|
'timestamp': parse_iso8601(video_info.get('PodcastPublishDate'), ' '),
|
||||||
|
'duration': int_or_none(video_info.get('PodcastDuration')),
|
||||||
|
'channel': player.get('podcastsApi').get('data').get('channel').get('PodcastChannelTitle'),
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user