View Single Post
Old 10-28-2009, 11:37 AM   #842
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,455
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There are two alternative approaches you can take

1) Get the webpage and search for the cover URL in it

2) Try alternative URLs

Both require some programming

I'll outline 2

Code:
from datetime import datetime, timedelta

t = datetime.utcnow()
while True:
    url = t.strftime('http://whatever/%Y/%m%d_large.jpg')
    try:
         self.browser.open(url)
         return url
    except:
          t = t - timedelta(days=1)
kovidgoyal is offline