Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-31-2017, 06:22 PM   #1
ztwig
Junior Member
ztwig began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jun 2017
Device: Kindle Paperwhite 2
London Review of Books - Back Issues?

Hi!

I'm a paid subscriber to the London Review of Books and was wondering if there was a way to alter the recipe to download previous issues of the magazine?

Any help would be greatly appreciated.
ztwig is offline   Reply With Quote
Old 02-05-2018, 02:00 AM   #2
praimon
Member
praimon began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Oct 2013
Device: none
This is how I do it: let's say you want issue Vol. 38 No. 17.
Change the existing lrb_payed.recipe as follows:
Create the new constants
ARCHIVE_SUFFIX = '/v38/n17/contents'
ARCHIVE = INDEX + ARCHIVE_SUFFIX

Navigate to that issue and note the exact date. In this case
it would be '8 September 2016'. Create the new constant
ARCHIVE_DATE = '8 September 2016'
[Note: you should really be able to grab the date automatically,
but my previous code doesn't work with the latest recipe/website.
Don't have the energy to investigate this.]

Change line 44 from
soup = self.index_to_soup(self.INDEX)
to
soup = self.index_to_soup(self.ARCHIVE)

Change line 47 from
newdates = re.sub('\<.*\>', '', re.split('<br />', dates)[1])
to
newdates = self.ARCHIVE_DATE

Change line 51 from
self.cover_url = re.sub('/m/', '/l/', cover_item.a.img['src'])
to
self.cover_url = re.sub('/m/', '/l/', cover_item.img['src'])

Change line 52 from
content = self.INDEX + cover_item.a['href']
to
content = self.ARCHIVE

Unless you automate the process with a script, you need
to manually change ARCHIVE_SUFFIX and ARCHIVE_DATE
for every issue.

regards,
praimon


Quote:
Originally Posted by ztwig View Post
Hi!

I'm a paid subscriber to the London Review of Books and was wondering if there was a way to alter the recipe to download previous issues of the magazine?

Any help would be greatly appreciated.
praimon is offline   Reply With Quote
Advert
Old 10-27-2019, 03:07 AM   #3
franklekens
Addict
franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.
 
franklekens's Avatar
 
Posts: 275
Karma: 659674
Join Date: Sep 2009
Device: Kobo Forma, Kobo Aura ONE, Kindle Oasis 2, Kindle Keyboard
Thanks for the explanation. Meanwhile, they seem to have put their entire back archive online, from October 1979 onwards. It would obviously be nice to have the ability to download separate issues from that once in a while. Does anybody know of an easier way to do this than by editing recipes?

I've tried the above procedure and managed to download the very first issue only after quite a bit of hassle.
One thing I noticed: it's as though you have to press "download now" twice for every download to work. The first time I get an error message, I have to click the menus away. And then only when I try it a second time, the archive issue is downloaded.
That's rather involved -- not to mention having to delve into the "edit recipes" menu again (and me always forgetting which of the two menu options under fetch news I have to choose: I don't find it very intuitive that you can't just click through to edit recipe from the schedule menu). And remembering which of the lines you have to change in which way in order to download a specific issue.

Any help & automation would be appreciated by this python-analfabete!

Last edited by franklekens; 10-27-2019 at 03:18 AM.
franklekens is offline   Reply With Quote
Old 12-29-2019, 10:07 AM   #4
Argel
Opinionated [but right]
Argel is no ebook tyro.Argel is no ebook tyro.Argel is no ebook tyro.Argel is no ebook tyro.Argel is no ebook tyro.Argel is no ebook tyro.Argel is no ebook tyro.Argel is no ebook tyro.Argel is no ebook tyro.Argel is no ebook tyro.
 
Argel's Avatar
 
Posts: 276
Karma: 1412
Join Date: Apr 2008
Location: UK
Device: Cybook Gen3, PRS 505, Kindle International, HTC Desire
Slightly easier recipe for LRB back issues

Kovid Goyal has kindly updated the subscriber download for LRB (the paywall goes up again soon) and I've amended it to allow for retrieving named editions. You still have to edit the script but only to change the volume and edition - two 2-digit numbers.

https://www.mobileread.com/forums/sh...d.php?t=326045

Argel
Argel is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
London Review of Books recipe updated rainrdx Recipes 1 12-25-2012 07:11 PM
London Review of Books - fixed cover URL Frescard Recipes 0 11-05-2012 08:54 PM
Periodicals: Back Issues? JayKindle Recipes 0 09-16-2011 04:01 PM
LONDON REVIEW BLOG JFS-NMF Recipes 6 07-13-2011 06:02 PM
London Review of Books Blog JFS-NMF Recipes 0 01-12-2011 03:20 PM


All times are GMT -4. The time now is 12:00 AM.


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