From 4b1144ff063647b8d1f572633dc72e8d9d5b6f0a Mon Sep 17 00:00:00 2001 From: Cameron Rossington Date: Wed, 28 Aug 2019 01:27:39 -0400 Subject: [PATCH 1/2] Look for podcast description in generic extractor. Tries sequentially to find common tags containing episode descriptions for podcasts when using the generic extractor. Silently allows description to be None if there are not any found. --- youtube_dl/extractor/generic.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index d34fc4b15..65ff452ac 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -2164,10 +2164,19 @@ class GenericIE(InfoExtractor): if not next_url: continue + description = None + for tag in ('description', 'content:encoded', 'itunes:summary', 'itunes:subtitle'): + try: + description = it.find(tag).text + break + except AttributeError: + pass + entries.append({ '_type': 'url_transparent', 'url': next_url, 'title': it.find('title').text, + 'description': description }) return { From 8deeeb87a9b13ea39b333fa4da7142f13df7be49 Mon Sep 17 00:00:00 2001 From: "Cam.Rossington.MacAir" Date: Sat, 31 Aug 2019 16:54:23 -0400 Subject: [PATCH 2/2] Add test for podcast with episode descriptions. Test runs successfully, but does not yet test for the existence of episode descriptions. --- youtube_dl/extractor/generic.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 65ff452ac..9bb7a537c 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -213,6 +213,20 @@ class GenericIE(InfoExtractor): }, 'playlist_mincount': 100, }, + # Podcast RSS feed with episode descriptions + { + 'url': 'http://friendsatthetable.net/rss', + 'info_dict': { + 'id': 'http://friendsatthetable.net/rss', + 'description': 'Friends at the Table is an actual play podcast about critical worldbuilding, smart characterization, and fun interaction between good friends. Find us (and a listener guide) @Friends_Table on Twitter.', + 'title': 'Friends at the Table', + '_type': 'playlist', + }, + 'playlist_mincount': 200, + 'entries': [{ + 'description': True, + }], + }, # SMIL from http://videolectures.net/promogram_igor_mekjavic_eng { 'url': 'http://videolectures.net/promogram_igor_mekjavic_eng/video/1/smil.xml',