diff --git a/app.yaml b/app.yaml
index 22c205e..c6ba9dd 100644
--- a/app.yaml
+++ b/app.yaml
@@ -1,6 +1,6 @@
# ffd-retief-hrd fanfictiondownloader
application: fanfictiondownloader
-version: 4-4-36
+version: 4-4-37
runtime: python27
api_version: 1
threadsafe: true
diff --git a/defaults.ini b/defaults.ini
index f3aa3aa..5f672c7 100644
--- a/defaults.ini
+++ b/defaults.ini
@@ -1144,6 +1144,16 @@ extracategories:Queer as Folk
## this should go in your personal.ini, not defaults.ini.
#is_adult:true
+[www.restrictedsection.org]
+extracategories:Harry Potter
+extragenres:Erotica
+## Some sites require login (or login for some rated stories) The
+## program can prompt you, or you can save it in config. In
+## commandline version, this should go in your personal.ini, not
+## defaults.ini.
+#username:YourName
+#password:yourpassword
+
[www.scarvesandcoffee.net]
## Site dedicated to these categories/characters/ships
extracategories:Glee
diff --git a/fanficdownloader/adapters/__init__.py b/fanficdownloader/adapters/__init__.py
index 22e3b5d..3fcc216 100644
--- a/fanficdownloader/adapters/__init__.py
+++ b/fanficdownloader/adapters/__init__.py
@@ -106,11 +106,11 @@ import adapter_indeathnet
import adapter_jlaunlimitedcom
import adapter_qafficcom
import adapter_efpfanficnet
-#import adapter_buffynfaithnet
import adapter_potterficscom
import adapter_efictionestelielde
import adapter_dotmoonnet
import adapter_pommedesangcom
+import adapter_restrictedsectionorg
## This bit of complexity allows adapters to be added by just adding
## importing. It eliminates the long if/else clauses we used to need
diff --git a/fanficdownloader/adapters/adapter_restrictedsectionorg.py b/fanficdownloader/adapters/adapter_restrictedsectionorg.py
new file mode 100644
index 0000000..692183d
--- /dev/null
+++ b/fanficdownloader/adapters/adapter_restrictedsectionorg.py
@@ -0,0 +1,235 @@
+# -*- coding: utf-8 -*-
+
+# Copyright 2013 Fanficdownloader team
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+import time
+import logging
+logger = logging.getLogger(__name__)
+import re
+import urllib2
+import cookielib as cl
+from datetime import datetime
+import json
+
+from .. import BeautifulSoup as bs
+from ..htmlcleanup import stripHTML
+from .. import exceptions as exceptions
+
+from base_adapter import BaseSiteAdapter, makeDate
+
+def getClass():
+ return RestrictedSectionOrgSiteAdapter
+
+class RestrictedSectionOrgSiteAdapter(BaseSiteAdapter):
+
+ def __init__(self, config, url):
+ BaseSiteAdapter.__init__(self, config, url)
+
+ self.decode = ["Windows-1252",
+ "utf8"] # 1252 is a superset of iso-8859-1.
+ # Most sites that claim to be
+ # iso-8859-1 (and some that claim to be
+ # utf8) are really windows-1252.
+
+ self.username = "NoneGiven" # if left empty, site doesn't return any message at all.
+ self.password = ""
+
+ # normalized story URL.
+ # get story/file and storyId from url--url validation guarantees query correct
+ m = re.match(self.getSiteURLPattern(),url)
+ if m:
+ self.story.setMetadata('storyId',m.group('id'))
+ logger.debug("storyId: (%s)"%self.story.getMetadata('storyId'))
+ # normalized story URL.
+ self._setURL('http://' + self.getSiteDomain() + '/' + m.group('filestory') + '.php?' + m.group('filestory') + '=' + self.story.getMetadata('storyId'))
+ logger.debug("storyUrl: (%s)"%self.story.getMetadata('storyUrl'))
+ else:
+ raise exceptions.InvalidStoryURL(url,
+ self.getSiteDomain(),
+ self.getSiteExampleURLs())
+
+ self.story.setMetadata('siteabbrev','ressec')
+ # The date format will vary from site to site.
+ # http://docs.python.org/library/datetime.html#strftime-strptime-behavior
+ self.dateformat = "%d %b %Y" # 20 Nov 2005
+
+ @staticmethod # must be @staticmethod, don't remove it.
+ def getSiteDomain():
+ return 'www.restrictedsection.org'
+
+ def getSiteExampleURLs(self):
+ return "http://"+self.getSiteDomain()+"/story.php?story=1234 http://"+self.getSiteDomain()+"/file.php?file=1234"
+
+ def getSiteURLPattern(self):
+ return re.escape("http://"+self.getSiteDomain())+r"/(?P
after class=info table (including hr)
+ hr = div.find('table',{'class':'info'}).findNext('hr')
+ for tag in hr.findAllPrevious():
+ tag.extract()
+ hr.extract()
+
+ # Remove all tags after the last
(including hr)
+ hr = div.findAll('hr')[-1]
+ for tag in hr.findAllNext():
+ tag.extract()
+ hr.extract()
+
+ return self.utf8FromSoup(url,div)
diff --git a/index.html b/index.html
index 9a0a573..142e457 100644
--- a/index.html
+++ b/index.html
@@ -54,17 +54,17 @@
much easier.
- New Spanish language site supported: www.potterfics.com (Thanks Dan!) -
-
Questions? Check out our @@ -74,7 +74,7 @@ If you have any problems with this application, please report them in the FanFictionDownLoader Google Group. The - Previous Version is also available for you to use if necessary. + Previous Version is also available for you to use if necessary.