mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/unkn0w7n/calibre
This commit is contained in:
commit
757b530005
@ -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': {
|
||||
|
@ -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': {
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user