[listennow] new extractor
Mainly a redirect for radioplay sites. Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
This commit is contained in:
parent
4d3e895708
commit
cfc78f02a4
@ -592,6 +592,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 .liveleak import (
|
from .liveleak import (
|
||||||
|
27
youtube_dl/extractor/listennow.py
Normal file
27
youtube_dl/extractor/listennow.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
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)
|
Loading…
Reference in New Issue
Block a user