Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
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
Old 02-11-2014, 01:26 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,318
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the builtin wall street journal recipe as a base, it probably needs only simple changes to get it to fetch the asia edition instead of the us edition (assuming the two websites have the same layout).
kovidgoyal is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Wall Street Journal gcnorth Recipes 9 06-14-2012 05:38 PM
Wall Street Journal winterescape Recipes 8 08-14-2011 01:01 PM
Wall Street Journal NewsFeed erichoch General Discussions 0 08-23-2010 07:40 PM
Wall Street Journal dieterpops Sony Reader 0 12-20-2009 05:51 PM
Wall Street Journal still not convinced Argel News 28 12-02-2009 05:48 PM


All times are GMT -4. The time now is 10:55 PM.


MobileRead.com is a privately owned, operated and funded community.