testing #16

Merged
pi-ux-ce merged 34 commits from testing into main 2026-07-04 17:40:00 +00:00
Showing only changes of commit b11c840688 - Show all commits
+7 -3
View File
@@ -1,21 +1,25 @@
import requests
import xmltodict
import urllib.request
from urllib import request as urlrequest
from urllib import parse as urlparse
from django.template.loader_tags import ExtendsNode
def rss_to_dict(url):
response = requests.get(url)
data = xmltodict.parse(response.content)
#print(data['rss'])
title = data['rss']['channel']['title']
#Get the keys if needed of debug
#print(data['rss'].keys())
#use first object as it's ordered in a chronological order
today_object = data['rss']['channel']['item'][0]
today_title = today_object['title']
today_podcast_url = data['rss']['channel']['item'][0]['enclosure']['@url']
return title,today_title,today_podcast_url
def download_news_mp3(url_mp3, filename):