#!/usr/bin/env python
#
# Created by StOOdi
#
import rssparser
import sys
path = sys.path[0]
data = rssparser.parse("http://www.linux.pl/rss.php")

channel = data['channel']
items =  data['items']

# Here we can print channel name and link to main site
# getin images is possible too :)
#
#print channel['title']
#print channel['link']

# printing links to news file
#
#
news = open(path + '/newstemp', 'w')
for item in items:
    news.write(item['title']+"\n")
    news.write(item['link']+"\n")
news.close()
