mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 12:36:11 +02:00
Brought fimfiction.net fic status in line with other adapters
This commit is contained in:
parent
070096e9cb
commit
4a4ec3863d
1 changed files with 6 additions and 1 deletions
|
|
@ -115,7 +115,12 @@ class FimFictionNetSiteAdapter(BaseSiteAdapter):
|
|||
#
|
||||
|
||||
status_bar = soup.findAll('li')[-1]
|
||||
self.story.setMetadata('status', status_bar.text.split("|")[0].strip())
|
||||
# In the case of fimfiction.net, possible statuses are 'Completed', 'Incomplete', 'On Hiatus' and 'Cancelled'
|
||||
# For the sake of bringing it in line with the other adapters, 'Incomplete' and 'On Hiatus' become 'In-Progress'
|
||||
# and 'Complete' beomes 'Completed'. 'Cancelled' seems an important enough (not to mention more strictly true)
|
||||
# status to leave unchanged.
|
||||
status = status_bar.text.split("|")[0].strip().replace("Incomplete", "In-Progress").replace("On Hiatus", "In-Progress").replace("Complete", "Completed")
|
||||
self.story.setMetadata('status', status)
|
||||
self.story.setMetadata('rating', status_bar.span.text)
|
||||
self.story.setMetadata('numWords', status_bar.div.b.text)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue