From dbebdfae9827ac7a380465d76c9066c79b9b8a0b Mon Sep 17 00:00:00 2001 From: Joakim Soderlund Date: Sun, 18 Dec 2016 19:02:57 +0100 Subject: [PATCH] Add default prefetch settings to fetchers --- fimfarchive/fetchers.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fimfarchive/fetchers.py b/fimfarchive/fetchers.py index 3fdff7c..823cee8 100644 --- a/fimfarchive/fetchers.py +++ b/fimfarchive/fetchers.py @@ -41,6 +41,8 @@ class Fetcher: """ Abstract base class for story fetchers. """ + prefetch_meta = False + prefetch_data = False def __enter__(self): """ @@ -113,6 +115,9 @@ class FimfictionFetcher(Fetcher): """ Fetcher for Fimfiction. """ + prefetch_meta = True + prefetch_data = False + data_path = 'https://www.fimfiction.net/download_story.php' meta_path = 'https://www.fimfiction.net/api/story.php' @@ -184,6 +189,8 @@ class FimfarchiveFetcher(Fetcher): """ Fetcher for Fimfarchive. """ + prefetch_meta = True + prefetch_data = True def __init__(self, file): """