Quote:
Originally Posted by tbaac
Thanks for that. I ended up with this:
Code:
def parse_feeds (self):
feeds = BasicNewsRecipe.parse_feeds(self)
for feed in feeds:
for article in feed.articles[:]:
feedps = feed.title + ' '
newtitle = feedps + article.title
article.title = newtitle
print 'New article title is: ', article.title
return feeds
Edit: The indenting looks correct in the above code segment but not when its shown in the post...
|
It's correct now. Use the hash/pound mark to apply CODE tags around and preserve indenting.
Quote:
Unfortunately it seems to have no effect and the print line doesn't seem to get run.
|
I pasted your code into a working recipe and it worked perfectly. The article titles had the feed title prepended, and the print worked.
Quote:
I've noticed that in the existing Guardian recipe and in the Wikileaks recipe that someone nicely posted I get an error:
Quote:
XMLSyntaxError: Opening and ending tag mismatch: hr line 38 and div, line 39, column 7
|
I'm running the latest version on Ubuntu linux. Anyone had this error and know a solution?
The recipes still create output.
|
It looks like a bad page with bad html, not a recipe error.