Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Commit

Permalink
Update podcast.py
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbailey authored Dec 17, 2016
1 parent 6b6d695 commit 72efaf8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions podcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ def getURL(url):
rss = '<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" version="2.0"><channel><title>Localhost</title><language>en-US</language>'
timestamp = formatdate(0)
for index, row in urls.iterrows():
rss += "<item>"
rss += "<title>" + row['Song'] + "</title>"
rss += "<pubDate>" + timestamp + "</pubDate>"
rss += "<enclosure url=\"" + str(row['urlfilesize'][0]) + "\" length=\"" + str(row['urlfilesize'][1]) + "\" type=\"video/mp4\" />"
rss += "</item>"
if row['urlfilesize'][0] != 'nourl':
rss += "<item>"
rss += "<title>" + row['Song'] + "</title>"
rss += "<pubDate>" + timestamp + "</pubDate>"
rss += "<enclosure url=\"" + str(row['urlfilesize'][0]) + "\" length=\"" + str(row['urlfilesize'][1]) + "\" type=\"video/mp4\" />"
rss += "</item>"

rss += "</channel></rss>"

Expand Down

0 comments on commit 72efaf8

Please sign in to comment.