View Single Post
Old 02-11-2014, 01:14 AM   #1
Casalyn
Junior Member
Casalyn began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2014
Device: calibre
Asian Wall Street Journal epaper

Old fashioned and no experience - trying to automatically grab my epaper version of the Asian Wall Street Journal (like the layout of the print edition). Tried to cut and copy code from the bbc and nyt examples but I seem to be getting login errors. Can anybody point me to what I need to look at? I know I will need to change the URL eventually so that it automatically changes per the date, but I am just trying to get the hang of how to do this to start? Here's the recipe (don't laugh, I am sure there are loads of errors):

class AdvancedUserRecipe1392097259(BasicNewsRecipe):
title = u'Asian Wall Street Journal'
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = True
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://epaper.wsj-asia.com/login.shtml')
br.select_form(name='login')
br['USERID'] = self.username
br['PASSWORD'] = self.password
br.submit()
return br

feeds = [(u'Asian Wall Street Journal', u'http://epaper.wsj-asia.com/PUBLICATIONS/WSJA/WSJA/2014/02/11/PagePrint/11_02_2014.pdf')]
Casalyn is offline   Reply With Quote