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. # downloaded with connection reset by peer (104) errors.
delay = 3 delay = 3
from_archive = False from_archive = True
recipe_specific_options = { recipe_specific_options = {
'date': { 'date': {

View File

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

View File

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