|
|
|
@ -62,6 +62,9 @@ episodes = []
|
|
|
|
|
# Check problem fields
|
|
|
|
|
MediaWiki::logger.warn "Field beschreibung in #{episode["url"]} empty" if episode["description"] == ""
|
|
|
|
|
|
|
|
|
|
# Skip episodes with no download URL, e.g. future episodes
|
|
|
|
|
next if episode["enclosure_url"] == ""
|
|
|
|
|
|
|
|
|
|
# Get a real date
|
|
|
|
|
erste_sendung.gsub!(/\s*um\s*\d+:\d+$/,"")
|
|
|
|
|
if erste_sendung !~ /^[0-9]{2}\.[0-9]{2}\.[0-9]{4}.*$/
|
|
|
|
@ -72,7 +75,12 @@ episodes = []
|
|
|
|
|
episode["pubdate"] = episode["date"].strftime(RFC822)
|
|
|
|
|
|
|
|
|
|
# Get content type and length
|
|
|
|
|
begin
|
|
|
|
|
head = head(episode["enclosure_url"])
|
|
|
|
|
rescue Errno::ECONNREFUSED
|
|
|
|
|
MediaWiki::logger.warn "Something wrong with download URL #{episode["enclosure_url"]}, skipping."
|
|
|
|
|
next
|
|
|
|
|
end
|
|
|
|
|
episode["length"] = head["content-length"]
|
|
|
|
|
episode["type"] = head["content-type"]
|
|
|
|
|
|
|
|
|
|