@kiklop - I unfortunately can't run the Vreme recipe (requires a login). Does it result in a page with only one link on it called "Articles"? My code (concidentally) seems to be quite close to what you suggested already (unless I'm missing something). The recipe for the Atlantic also results in a single page with a "Current Issue" link, which comes from the way parse_index passes back the list of feeds.
Code:
def parse_index(self):
films = []
soup = self.index_to_soup(self.Index)
for item in soup.findAll('td', attrs={'class':'title'}):
if self.DEBUG: print 'i:', item, 's:', item.string
description = ''
a = item.find('a')
if a == None:
self.title = item.string.replace('AKTUELLE FILMLISTE', 'ZH Cinema')
if self.DEBUG: print 'title:', self.title
else:
if a.has_key('href'):
url = a['href'].replace('..', 'http://www.kulturinfo.ch/kino')
if self.DEBUG: print 'url:', url
title = self.tag_to_string(a)
films.append({
'title':title,
'date':'',
'url':url,
'description':description
})
if self.DEBUG: print 'ls:', films[-1]
if self.DEBUG: print 'ret:', ['x', films]
return [('Filme', films)]
Any ideas?
ax42