Economist recipe fetches old issue

Bug #1803661 reported by Lameventanas
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

I'm using Calibre 3.34 with the Economist recipe.

I am trying to download today's Economist issue, but it downloads the one from last week (which I already had).

I know the new one was released already because I can see it in their website.

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1803661

this is a bug on the economist website, going to the URL

https://www.economist.com/printedition/

is redirecting to last weeks issue instead of this weeks issue. Inform
them on that bug, and once they fix it, the recipe will work
automatically.

 status invalid

Changed in calibre:
status: New → Invalid
Revision history for this message
Lameventanas (lameventanas) wrote :

I don't know whether they would agree that this is a bug on their website, and I doubt they would cooperate to make a program designed to scrape their website work.

So I changed the code of the recipe like this:

...
from datetime import date
...
 dt = date.today()
 if dt.weekday() < 4:
  dt -= timedelta(days = 3 + dt.weekday)
    INDEX = 'https://www.economist.com/printedition/' + dt
...

It seems to work.

Revision history for this message
Kovid Goyal (kovid) wrote :

The URL that leads to their current printedition going to the wrong edition is
definitely a bug, but in anycase i've already changed the recipe to
workaround it.

Revision history for this message
kinming (kinming) wrote :

thank you all; it is working fine now, thanks so much.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.