Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[generic] support for various podcast sites #16880

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions youtube_dl/extractor/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2059,6 +2059,21 @@ class GenericIE(InfoExtractor):
},
'skip': 'TODO: fix nested playlists processing in tests',
},
{
'url': 'https://logbuch-netzpolitik.de/lnp247-lastesel-mit-glasfaseranschluss',
'info_dict': {
'id': 'lnp247-lastesel-mit-glasfaseranschluss',
'ext': 'opus',
'formats': 'mincount:4',
'title': 'LNP247 Lastesel mit Glasfaseranschluss',
'description': 'md5:9319166b6cfb8054f2875790a77cae09',
'site_name': 'Logbuch:Netzpolitik',
'thumbnail': r're:^https?://.*\.jpg$',
},
'params': {
'skip_download': True,
},
},
# {
# # TODO: find another test
# # http://schema.org/VideoObject
Expand Down Expand Up @@ -3164,6 +3179,26 @@ def _real_extract(self, url):
if json_ld.get('url'):
return merge_dicts(json_ld, info_dict)

# Look for Metaebene alike embedded podcast
audio_embeds = zip(
re.findall(self._og_regexes('audio')[0], webpage),
re.findall(self._og_regexes('audio:type')[0], webpage))
if audio_embeds:
formats = []
for audio_url, audio_type in audio_embeds:
formats.append({
'url': audio_url[0],
'format_id': audio_type[0]})
self._sort_formats(formats)
info_dict.update({
'title': self._og_search_title(webpage),
'site_name': self._og_search_property('site_name', webpage),
'description': self._og_search_description(webpage),
'thumbnail': self._og_search_thumbnail(webpage),
'formats': formats,
})
return info_dict

def check_video(vurl):
if YoutubeIE.suitable(vurl):
return True
Expand Down