Set site-specific language and category correctly.

This commit is contained in:
Dmitry Kozliuk
2015-07-22 14:31:06 +03:00
parent 707f7a347b
commit aa93d4bb2d
3 changed files with 19 additions and 2 deletions
+11
View File
@@ -1132,6 +1132,17 @@ extracategories:Lord of the Rings
## Site dedicated to these categories/characters/ships
extracategories:Harry Potter
[www.masseffect2.in]
## Site dedicated to this fandom.
extracategories: Mass Effect
## Stories on the site almost never have cover image.
## May be adjusted in `personal.ini' on per-story basis.
cover_exclusion_regexp:.*
my_custom_label: Some text
my_custom_setting: true
[merlinfic.dtwins.co.uk]
## Some sites require login (or login for some rated stories) The
## program can prompt you, or you can save it in config. In
@@ -99,6 +99,8 @@ class MassEffect2InAdapter(BaseSiteAdapter):
''',
re.IGNORECASE + re.UNICODE + re.VERBOSE)
SITE_LANGUAGE = u'Russian'
def __init__(self, config, url):
BaseSiteAdapter.__init__(self, config, url)
@@ -225,6 +227,9 @@ class MassEffect2InAdapter(BaseSiteAdapter):
'numWords', str(self._transient_metadata['numWords']))
self.story.setMetadata(
'numChapters', self._transient_metadata['numChapters'])
# Site-specific metadata.
self.story.setMetadata(
'language', self.SITE_LANGUAGE)
def getChapterText(self, url):
"""Grabs the text for an individual chapter."""
+3 -2
View File
@@ -1728,8 +1728,6 @@ extraships:InuYasha/Kagome
extracategories:Lord of the Rings
[www.masseffect2.in]
## Site with stories in this language.
language:Russian
## Site dedicated to this fandom.
extracategories:Mass Effect
@@ -1737,6 +1735,9 @@ extracategories:Mass Effect
## May be adjusted in `personal.ini' on per-story basis.
cover_exclusion_regexp:.*
my_custom_label:Some text
my_custom_setting:true
[www.mediaminer.org]
[www.midnightwhispers.ca]