mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
594e44974c
commit
afde5319c2
@ -32,7 +32,8 @@ class TheHindu(BasicNewsRecipe):
|
|||||||
recipe_specific_options = {
|
recipe_specific_options = {
|
||||||
'location': {
|
'location': {
|
||||||
'short': 'The name of the local edition',
|
'short': 'The name of the local edition',
|
||||||
'long': 'If The Hindu is available in your local town/city,\nset this to your location, for example, hyderabad'
|
'long': 'If The Hindu is available in your local town/city,\nset this to your location, for example, hyderabad',
|
||||||
|
'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)',
|
||||||
@ -60,12 +61,10 @@ class TheHindu(BasicNewsRecipe):
|
|||||||
return soup
|
return soup
|
||||||
|
|
||||||
def parse_index(self):
|
def parse_index(self):
|
||||||
|
local_edition = 'th_international'
|
||||||
local_edition = self.recipe_specific_options.get('location')
|
d = self.recipe_specific_options.get('location')
|
||||||
if local_edition and isinstance(local_edition, str):
|
if d and isinstance(d, str):
|
||||||
local_edition = 'th_' + local_edition
|
local_edition = 'th_' + d
|
||||||
else:
|
|
||||||
local_edition = 'th_international'
|
|
||||||
|
|
||||||
past_edition = self.recipe_specific_options.get('date')
|
past_edition = self.recipe_specific_options.get('date')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user