Update adapter_storiesonlinenet.py

Added age/rating field parsing for finestories and scifistories
This commit is contained in:
Brian 2021-11-12 17:00:41 -08:00 committed by GitHub
parent a829d01e7c
commit 36efc7366e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -426,8 +426,10 @@ class StoriesOnlineNetAdapter(BaseSiteAdapter):
value = b.nextSibling
#logger.debug('label: "%s", value: "%s"' % (label, value))
if 'Sex' in label:
if 'Sex' in label: # storiesonline.net uses '<b>Sex Contents:</b> No Sex'
self.story.setMetadata('rating', value)
if 'Age' in label: # finestories.com,scifistories.com use '<b>Age Rating:</b> Older than XX | '
self.story.setMetadata('rating', value.split('|')[0])
if 'Score' in label and value != '-':
self.story.setMetadata('score', value)