반응형
import feedparser
urls = (
"http://bomsoft.com/rss",
"http://abc.com/rss"
)
def crawl_rss (url) :
d = feedparser.parse(url)
print( type(d))
print( d.feed["title"] )
for e in d.entries :
print ("title = " + e.title)
print ("link = " + e.link)
print ("description = " + e.description)
print ("pubDate = " + str(e.published) )
if __name__ == "__main__" :
for url in urls:
crawl_rss(url)
반응형