Here’s what I have. I’m getting a syntax error with ‘])’, and I don’t get why?
import datetime
import PyRSS2Gen
jp = "Mokuyoubi"
en = "Thursday"
rss = PyRSS2Gen.RSS2(
title = "Vocab of the Day - JapLearn.com",
link = "http://www.JapLearn.com",
description = "The latest JapLearn.com"
"Vocab of the Day!",
lastBuildDate = datetime.datetime.utcnow(),
items = [
PyRSS2Gen.RSSItem(
title = "Vocab of the Day - Date",
link = "http://www.JapLearn.com",
description = " Japanese: "+jp+
"Translation: "+en,
pubDate = datetime.datetime()
])
rss.write_xml(open("japlearn-votd.xml", "w"))
Close
(parenthesis first and than close[.As @levon suggested these things should be handelled by your
editor. I personally use Vim with syntastic for automatic syntax checking.You also need to provide provide proper arguments to
pudate = datetime.datetime(). Take a look at the example given here.Your code gave me this error on execution.