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 01-25-2012, 05:30 AM   #1
Olger
Member
Olger began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Nov 2011
Device: Kobo Touch
Lost trying to get url for time.com cover

Hi All,
I've got a time.com recipe based on the publically available RSS from the site, and am trying to make it all nice and pretty and get the current cover for it.
On the page http://www.time.com/time/coversearch
the first cover is the most recent one.
I figured that I would have to search the page for : <ul class="ul-covers"> and then grab the first url within the <figure class="entry-content"> tag.
Problem is, how to code it?
I've had a look at Kovids time mag example, but that requires logging into the website and as I stated, my python just isn't that good (yet).
Anyone have an idea?

Cheers! Olger.
Olger is offline   Reply With Quote
Old 01-25-2012, 06:09 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: 25,419
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The builtin Time recipe does not require a login and gets the cover.
kovidgoyal is offline   Reply With Quote
Old 02-05-2012, 03:43 AM   #3
Olger
Member
Olger began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Nov 2011
Device: Kobo Touch
Hi Kovid,
Yeah, I did notice that (sorry for the delayed reply, been a bit busy). But trying to modify that recipe with RSS feeds turns out not so easy.
Are there other recipes that grab the cover by parsing a html page looking for matches that are easier to modify?
Cheers! Olger
Olger is offline   Reply With Quote
Old 02-14-2012, 09:04 AM   #4
marlenunez
Junior Member
marlenunez began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2012
Device: Nook Simple Touch Reader
The website kiosko.net has covers for most of the important periodicals out there, including Time.

This code, adapted from a post by user miwie, will give you the current cover for Time if you run the recipe either on Sunday or Monday:
Code:
from time import strftime
...
	def get_cover_url(self):
		return 'http://img.kiosko.net/' + strftime("%Y/%m/%d") + '/us/time.750.jpg'
http://en.kiosko.net/us/np/time.html

http://img.kiosko.net/2012/02/13/us/time.750.jpg
marlenunez 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
Print friendly url unrelated to regular url (and javascript) sleepless Recipes 3 12-03-2011 10:43 AM
Los Tiempos, Bolivia cover URL pietvo Recipes 1 10-18-2011 02:20 PM
Touch Lost settings/corrupted cover when switching off dafrizz Kobo Reader 2 10-11-2011 09:19 AM
Lost cover art on 'Synching' Duiker Kobo Reader 10 05-27-2010 09:21 AM
Legacy formats are ticking time bomb for lost data Bob Russell News 70 07-22-2007 12:21 AM


All times are GMT -4. The time now is 02:40 PM.


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