![]() |
#1 |
Member
![]() 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. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,195
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The builtin Time recipe does not require a login and gets the cover.
|
![]() |
![]() |
![]() |
#3 |
Member
![]() 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 |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() 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://img.kiosko.net/2012/02/13/us/time.750.jpg |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |