mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-22 08:44:13 +01:00
Allow domain sufficientvelocity.com for forums.sufficientvelocity.com.
This commit is contained in:
parent
02bc402792
commit
f6b51d2b92
1 changed files with 11 additions and 1 deletions
|
|
@ -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\.)?")
|
||||
|
|
|
|||
Loading…
Reference in a new issue