![]() |
#1 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Dec 2013
Device: Kindle
|
So confused
I am completely new to this and completely lost. The local Nashville news paper the Tennessean provides a daily download already in mobi format. They read just fine on the Kindle.
http://nashvilletennessean.tn.newsme...&device=kindle I can't however for the life of me figure out how to use calibre to automate the process instead of manually going to the papers site and downloading it daily. I tried creating a recipe but that failed horribly. Any suggestions? |
![]() |
![]() |
![]() |
#2 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 241
Karma: 1001369
Join Date: Sep 2010
Device: prs300, kindle keyboard 3g
|
As far as i know Calibre can'y go to a site and fetch a mobi file.
what it does is take (scrape) websites and throw out everything except the article. if you go to http://www.tennessean.com/section/digital the list of RSS feeds are at the bottom of the page these URLs are what you add to the basic news recipe example Spoiler:
Hope that helps, sorry that's all i can offer. I recommend you read, http://manual.calibre-ebook.com/news...asicNewsRecipe |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() ![]() Posts: 43
Karma: 136
Join Date: Mar 2011
Device: Kindle Paperwhite
|
So confused
There is/was a few recipes downloading ePubs and using those. This should also work for mobi. There is sample code snippet here: https://www.mobileread.com/forums/sho...1&postcount=16
I think the German Zeit recipe used to do this. I would offer to briefly look into this, but the link above requires a subscription. @darkheritage: let me know if you still need this, PM me your logon details and I can take a look what the best way should be Last edited by aerodynamik; 01-04-2014 at 08:07 AM. |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: May 2014
Device: generic android
|
Hi
I am also having a tough time trying to use a Calibre recipe to download an epub from newsmemory.com. In my case the publication is the Fall River Herald News but I suspect the logic would be similar. I am able to download the epub file using a quick and dirty linux script that basically has 2 wget commands, the first wget does a post of the username and password, the second wget download the epub file. I'm not a python developer so I really having a hard time implementing this as a recipe. I have read the tutorials and the posting about epub downloading from Starson17 and achims. But I'm not getting too far. Having cleared up initial indentation issues my recipe completes without errors but the epub is not downloaded. I suspect my code is not even being invoked as I am unable to see the output of my print statements. Can anyone please get me repointed in the right direction ? Here is the code I am using with the command: ebook-convert frhn.recipe frhn -vvv --username myusername --password mypassword Code:
class AdvancedUserRecipe1415485404(BasicNewsRecipe): title = u'FallRiverHeraldNews' oldest_article = 7 max_articles_per_feed = 100 auto_cleanup = True needs_subscription = True feeds = [(u'Fall River Herald News', u'http://fallriverheraldnews.ma.newsmemory.com/ebook.php?page=downloadEbooks&device=android')] def get_browser(self): br = BasicNewsRecipe.get_browser() print 'You have entered get_browser ' if self.username is not None and self.password is not None: br.open('http://fallriverheraldnews.ma.newsmemory.com/ebook.php?page=downloadEbooks&device=android') br.select_form(name='Log in') br['USERID'] = self.username br['PASSWORD'] = self.password br.submit() return br def build_index(self): print 'You have entered build_index ' epub_url = "http://fallriverheraldnews.ma.newsmemory.com/ebook.php?page=downloadEbooks&device=android&date=20141109&token=" url = epub_url f = urllib2.urlopen(url) tmp = PersistentTemporaryFile(suffix='.epub') self.report_progress(0,_('downloading epub')) tmp.write(f.read()) tmp.close() zfile = zipfile.ZipFile(tmp.name, 'r') self.report_progress(0,_('extracting epub')) zfile.extractall(self.output_dir) tmp.close() index = os.path.join(self.output_dir, 'content.opf') self.report_progress(1,_('epub downloaded and extracted')) print 'You have leaving build_index ' return index |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,319
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Your indentation is wrong. The methods of the class have to be indented so that they line up with the class attributes.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: May 2014
Device: generic android
|
Thanks for that! I'm now making a bit of progress.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
confused? | pjmc2 | Introduce Yourself | 6 | 03-13-2011 07:58 AM |
confused | edeyar | Introduce Yourself | 4 | 02-18-2011 08:48 AM |
Confused | sparky750 | Which one should I buy? | 2 | 07-31-2009 12:55 PM |
I'm still so confused | Jaie | Which one should I buy? | 11 | 02-02-2009 08:30 PM |
Ok, I'm confused | phenomshel | HanLin eBook | 6 | 01-27-2009 08:05 PM |