This commit is contained in:
Kovid Goyal 2025-04-20 15:03:23 +05:30
commit 757b530005
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 5 additions and 5 deletions

View File

@ -252,7 +252,7 @@ class Economist(BasicNewsRecipe):
# downloaded with connection reset by peer (104) errors.
delay = 3
from_archive = False
from_archive = True
recipe_specific_options = {
'date': {

View File

@ -252,7 +252,7 @@ class Economist(BasicNewsRecipe):
# downloaded with connection reset by peer (104) errors.
delay = 3
from_archive = False
from_archive = True
recipe_specific_options = {
'date': {

View File

@ -3,7 +3,7 @@
import json
import re
from collections import defaultdict
from datetime import date, timedelta
from datetime import date
from calibre.web.feeds.news import BasicNewsRecipe, classes
@ -40,7 +40,7 @@ class TheHindu(BasicNewsRecipe):
'erode, hyderabad, international, kochi, kolkata,\n'
'kozhikode, madurai, mangalore, mumbai, thiruvananthapuram, '
'tiruchirapalli, vijayawada, visakhapatnam'),
'default': 'chennai'
'default': 'international'
},
'date': {
'short': 'The date of the edition to download (YYYY-MM-DD format)',
@ -76,7 +76,7 @@ class TheHindu(BasicNewsRecipe):
past_edition = self.recipe_specific_options.get('date')
dt = date.today() - timedelta(days=1)
dt = date.today()
if past_edition and isinstance(past_edition, str):
year, month, day = (int(x) for x in past_edition.split('-'))
dt = date(year, month, day)