mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-04-27 17:38:19 +02:00
Fix empty Genre parsing for adapter_ficwadcom
This commit is contained in:
parent
124eb4da85
commit
30006698ad
1 changed files with 3 additions and 1 deletions
|
|
@ -169,7 +169,9 @@ class FicwadComSiteAdapter(BaseSiteAdapter):
|
|||
if m:
|
||||
self.story.setMetadata('rating', m.group(1))
|
||||
|
||||
m = re.match(r".*?Genres: (.+?) -.*?",metastr)
|
||||
## Genre appears even if list is empty. But there are a
|
||||
## limited number of genres allowed by the site.
|
||||
m = re.match(r".*?Genres: ((?:(?:Angst|Crossover|Drama|Erotica|Fantasy|Horror|Humor|Parody|Romance|Sci-fi)(?:,)?)+) -.*?",metastr)
|
||||
if m:
|
||||
for g in m.group(1).split(','):
|
||||
self.story.addToList('genre',g)
|
||||
|
|
|
|||
Loading…
Reference in a new issue