diff --git a/fanficfare/adapters/adapter_forumssufficientvelocitycom.py b/fanficfare/adapters/adapter_forumssufficientvelocitycom.py index baa2540c..41e30262 100644 --- a/fanficfare/adapters/adapter_forumssufficientvelocitycom.py +++ b/fanficfare/adapters/adapter_forumssufficientvelocitycom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2015 FanFicFare team +# Copyright 2018 FanFicFare team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ # limitations under the License. # +import re + from base_xenforoforum_adapter import BaseXenForoForumAdapter def getClass(): @@ -32,3 +34,11 @@ class ForumsSufficientVelocityComAdapter(BaseXenForoForumAdapter): def getSiteDomain(): # The site domain. Does have www here, if it uses it. return 'forums.sufficientvelocity.com' + + @classmethod + def getAcceptDomains(cls): + return [cls.getSiteDomain(),'sufficientvelocity.com'] + + def getSiteURLPattern(self): + ## sufficientvelocity.com URLs without 'forums.' also work for SV, but not SB. + return super(ForumsSufficientVelocityComAdapter, self).getSiteURLPattern().replace(re.escape("forums."),r"(forums\.)?")