adapter_webnovelcom: normalize story URL.

This commit is contained in:
Jim Miller 2017-10-22 12:04:35 -05:00
parent 5c281f6ade
commit 82ed9fb43f

View file

@ -82,6 +82,10 @@ class WWWWebNovelComAdapter(BaseSiteAdapter):
# get storyId from url
# https://www.webnovel.com/book/6831837102000205
self.story.setMetadata('storyId', self.parsedUrl.path.split('/')[2])
# normalized story URL.
self._setURL('https://' + self.getSiteDomain() + '/book/'+self.story.getMetadata('storyId'))
# Each adapter needs to have a unique site abbreviation.
self.story.setMetadata('siteabbrev', 'wncom')