Add Podbay support.

This commit is contained in:
0x80 2021-12-30 00:00:00 +00:00
parent 57e2a92532
commit dd96cd22b2
Signed by: 0x80
GPG Key ID: 68368BCBC000EF51
3 changed files with 30 additions and 0 deletions

View File

@ -24,6 +24,8 @@ supported_sites = {
"pocketcasts" : ["pca.st"],
"podbay" : ["podbay.fm"],
"radiopublic" : ["radiopublic.com"],
"reddit" : ["reddit.com"],

View File

@ -0,0 +1,23 @@
#!/usr/bin/python3
from utils import *
from download_page import download
# portable code to get filename
import os
platform = os.path.basename(__file__)
if platform.endswith(".py"):
platform = platform[:(-3)]
def extract_from_page (page, verbosity):
return search (page, '"feed_url":"', '"')
def extract (url, page=None, network=False, verbosity=3, args={}):
# cannot get feed from URL alone
if not network:
return None
page = download (platform, url, args, verbosity)
feed = extract_from_page (page, verbosity)
if not feed is None:
return feed

5
tests/podbay.txt Normal file
View File

@ -0,0 +1,5 @@
# NOTE: Podbay uses Cloudflare
https://podbay.fm/p/the-t-wiz-podcast/charts https://feeds.redcircle.com/c5b06233-b342-46ec-ad82-d9d4d516b0a9
https://podbay.fm/p/the-t-wiz-podcast https://feeds.redcircle.com/c5b06233-b342-46ec-ad82-d9d4d516b0a9
https://podbay.fm/p/1001-classic-short-stories-and-tales/e/1640559600 https://feeds.megaphone.fm/ADL7573342845
https://podbay.fm/p/nevertheless-she-existed/e/1564556437 https://anchor.fm/s/11319d48/podcast/rss