Allow domain sufficientvelocity.com for forums.sufficientvelocity.com.

This commit is contained in:
Jim Miller 2018-04-02 18:35:25 -05:00
parent 02bc402792
commit f6b51d2b92

View file

@ -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\.)?")