This commit is contained in:
@@ -37,8 +37,12 @@ def pretty_filename(filename,extension=''):
|
||||
extension = str('.'+extension)
|
||||
return pretty_filename+extension
|
||||
|
||||
def main():
|
||||
def podcasts():
|
||||
telegram = telegramUtils()
|
||||
|
||||
#clear all expired messages before
|
||||
telegram.clear_expired_messages()
|
||||
|
||||
url = "https://feeds.audiomeans.fr/feed/44f6a116-20a6-44c4-98c4-b3e1bdd46dce.xml"
|
||||
today_podcast = rss_to_dict(url)
|
||||
print(today_podcast)
|
||||
@@ -46,4 +50,4 @@ def main():
|
||||
download_news_mp3(today_podcast[2],file)
|
||||
telegram.send_document(file,str(today_podcast[0])+" "+str(today_podcast[1]))
|
||||
|
||||
main()
|
||||
#main()
|
||||
@@ -1,3 +1,7 @@
|
||||
from django.shortcuts import render
|
||||
from django.http import HttpResponse
|
||||
from .utils import podcasts
|
||||
|
||||
# Create your views here.
|
||||
def execute_podcast(request):
|
||||
podcasts()
|
||||
return HttpResponse('<h1>Generating the podcast!</h1>')
|
||||
|
||||
Reference in New Issue
Block a user