From 1ecfb68fb21b5bdcc6ea4cbbcd6c98b3e372daca Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Sun, 16 Nov 2014 09:56:04 -0600 Subject: [PATCH] Fix for fimf not working with manual is_adult (caching issue). --- fanficdownloader/adapters/adapter_fimfictionnet.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fanficdownloader/adapters/adapter_fimfictionnet.py b/fanficdownloader/adapters/adapter_fimfictionnet.py index e3ccaec5..9f2775c4 100644 --- a/fanficdownloader/adapters/adapter_fimfictionnet.py +++ b/fanficdownloader/adapters/adapter_fimfictionnet.py @@ -88,7 +88,10 @@ class FimFictionNetSiteAdapter(BaseSiteAdapter): ## Get the story's title page. Check if it exists. try: - data = self.do_fix_blockquotes(self._fetchUrl(self.url)) + # don't use cache if manual is_adult--should only happen + # if it's an adult story and they don't have is_adult in ini. + data = self.do_fix_blockquotes(self._fetchUrl(self.url, + usecache=(not self.is_adult))) soup = bs.BeautifulSoup(data) except urllib2.HTTPError, e: if e.code == 404: