View Single Post
Old 08-24-2010, 06:54 AM   #2502
kerrware
Junior Member
kerrware began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2010
Device: none
My Recipe fails to place Articles data in epub.

Been trying to create my first simple recipe for a local paper - Ilkeston Advertiser (Derbyshire, England) with Free RSS Feeds. Manage to get the logon process working and ran the recipe in test mode. It seemed to download the first two articles into seperate directories each with an index.html first and an image subdirectory. Displaying the index file in Firefox shows the article data is being downloaded ok.
When I run the recipe in Calibre I get the the index summary pages ok but all the artciles refered to just contain header (Next Link, etc.) and footer lines (downloaded by Calibre, etc.).
Have I missed a something out?

Thanks.


Spoiler:

from calibre.web.feeds.news import BasicNewsRecipe
import re

class AdvancedUserRecipe1282596648(BasicNewsRecipe):
title = u'Ilkeston Advertsier'
oldest_article = 7
max_articles_per_feed = 100
needs_subscription = True

def get_browser(self):
br = BasicNewsRecipe.get_browser()
if self.username is not None and self.password is not None:
br.open('http://auth.jpress.co.uk/login.aspx?ReturnURL=http%3a%2f%2fwww.ilkestonadve rtiser.co.uk%2ftemplate%2fRegister.aspx%3fReturnUR L%3dhttp%3a%2f%2fwww.ilkestonadvertiser.co.uk%2ffr ontpage.aspx&SiteRef=IAS')
br.select_form(name='Form1')
br['ctl00$txtEmailAddress'] = self.username
br['ctl00$txtPassword'] = self.password
br.submit()
return br

feeds = [(u'Ilkeston Today - News', u'http://www.ilkestonadvertiser.co.uk/getfeed.aspx?sectionid=795&format=rss')]
kerrware is offline