User:Darija Medic/technicalcourse/epub
Epub consists of one feed for the titles, and a second for the chapters.
import feedparser
import pprint
import sys
pull = feedparser.parse("http://xkcd.com/rss.xml")
pull1 = feedparser.parse("http://rss.allrecipes.com/daily.aspx?hubID=80")
print """
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Feeder</title>
<link type="text/css" rel="stylesheet" media="all" href="stylesheet.css" />
</head>
<body>"""
for i in pull.entries:
print "<h1>"
print i["title"].replace("&", "&").encode("utf-8")
print"</h1>"
for e in pull1.entries:
print"<p>"
print e["summary"].replace("&", "&").encode("utf-8")
print "</p>"
print """
</body>
</html>"""
sys.exit()