def gnhome_planet(feed):
	d = feedparser.parse('http://planet.gnome.org/')

	i = 1
	while True:
		try:
			title =  remove_tags(d.feed.summary.strip().split('<h3 class="post-title">')[i].strip().split('</a></h3>')[0]).strip()
			author = remove_tags(d.feed.summary.strip().split('<div class="person-info">')[i].strip().split('</a>')[0]).strip()
			content = d.feed.summary.strip().split('<div class="post-contents ">')[i].strip().split('<div class="post-footer">')[0]
			Comments = ''

			j=0
			image_list = []
			while True:
				try:
					images = content.strip().split('src="')[j].strip().split('"')[0]
					j+=1
					if j!=0 and remove_tags(images).startswith('http'):
						image_list.append(remove_tags(images))
				except IndexError:
					break
			i+=1;
			add_new_entry(
				feed=feed,
				title=title,
				content=remove_tags(content),
				content_type='html/text',
				author=author,
				url='http://fedoraplanet.org/'+ str(i) + '/')
		except IndexError:
			break
def fedora_planet(feed):

	d = feedparser.parse('http://fedoraplanet.org/')

	i = 1
	while True:
		try:
			title = remove_tags(d.feed.summary.strip().split('<div class="blog-entry-title">')[i].strip().split('</a>')[0]).strip()
			author = remove_tags(d.feed.summary.strip().split('<div class="blog-entry-author">')[i].strip().split('<div class="fas-account">')[0]).strip()
			content = d.feed.summary.strip().split('<div class="blog-entry-content">')[i].strip().split('</div>')[0]
			Comments = ''

			j=0
			image_list = []
			while True:
				try:
					images = content.strip().split('src="')[j].strip().split('"')[0]
					j+=1
					if j!=0 and remove_tags(images).startswith('http'):
						image_list.append(remove_tags(images))
				except IndexError:
					break
			i+=1;
			add_new_entry(
				feed=feed,
				title=title,
				content=remove_tags(content),
				content_type='html/text',
				author=author,
				url='http://fedoraplanet.org/'+ str(i) + '/')
		except IndexError:
			break
def python_planet(feed):
	d = feedparser.parse('http://planetpython.org/')
	sam = d.feed.summary
	i = 1
	while True:
		try:
			title = remove_tags(sam.split('</a></h3>')[i].split('</a></h4>')[0])
			author = remove_tags(sam.split('<hr /><h3 class="post">')[i].split('</a></h3>')[0])
			content = sam.split('</a></h3>')[i].split('<em><a href')[0].split('</a></h4>')[1]
			Comments = ''

			j=0
			image_list = []
			while True:
				try:
					images = content.strip().split('src="')[j].strip().split('"')[0]
					j+=1
					if j!=0 and remove_tags(images).startswith('http'):
						image_list.append(remove_tags(images))
				except IndexError:
					break
			i+=1;
			add_new_entry(
				feed=feed,
				title=title,
				content=remove_tags(content),
				content_type='html/text',
				author=author,
				url='http://fedoraplanet.org/'+ str(i) + '/')
		except IndexError:
			break
def openstack_planet(feed):
	d = feedparser.parse('http://planet.openstack.org/')

	i = 1
	while True:
		try:
			title =  remove_tags(d.feed.summary.strip().split('</a></h3>')[i].strip().split('</a></h4>')[0]).strip()
			author = remove_tags(d.feed.summary.strip().split('<div class="channelgroup">')[i].strip().split('</h3>')[0]).strip()
			content = d.feed.summary.strip().split('<div class="content" lang="en-US">')[i].strip().split('<p class="date">')[0]
			Comments = ''

			j=0
			image_list = []
			while True:
				try:
					images = content.strip().split('src="')[j].strip().split('"')[0]
					j+=1
					if j!=0 and remove_tags(images).startswith('http'):
						image_list.append(remove_tags(images))
				except IndexError:
					break
			i+=1;
			add_new_entry(
				feed=feed,
				title=title,
				content=remove_tags(content),
				content_type='html/text',
				author=author,
				url='http://fedoraplanet.org/'+ str(i) + '/')
		except IndexError:
			break