{
  "sites": {
    "deviantart.com": {
      "story": {
        "title": "h1",
        "titleFallback": "meta[property='og:title']",
        "titleFallbackAttribute": "content",
        "author": {
          "strategy": "text-pattern",
          "pattern": "by ([^\\s]+) on DeviantArt",
          "searchAfter": "<title>",
          "searchBefore": "</title>"
        },
        "content": {
          "strategy": "deviantart-content", 
          "minLength": 200,
          "containerHints": ["journal", "literature", "story", "text", "content"],
          "excludeSelectors": ["script", "style", "nav", "header", "footer", ".dev-page-sidebar"]
        },
        "summary": "meta[property='og:description']",
        "summaryAttribute": "content",
        "tags": "a[data-tagname]",
        "tagsAttribute": "data-tagname",
        "coverImage": "meta[property='og:image']",
        "coverImageAttribute": "content"
      },
      "authorPage": {
        "storyLinks": "a[data-hook='deviation_link']",
        "filterStrategy": "dom-check",
        "requiresChildElement": "div[class*='journal']"
      }
    },
    
    "literotica.com": {
      "story": {
        "title": "h1",
        "titleFallback": "meta[property='og:title']",
        "titleFallbackAttribute": "content",
        "author": {
          "strategy": "link-with-path",
          "pathContains": "/authors/",
          "searchWithin": "header, .story-info, #story-meta"
        },
        "content": {
          "strategy": "text-blocks",
          "minLength": 500,
          "containerHints": ["story", "content", "text"],
          "excludeSelectors": ["script", "style", "nav", "header", "footer"]
        },
        "summary": "meta[name='description']",
        "summaryAttribute": "content",
        "multiPage": {
          "enabled": true,
          "strategy": "url-pattern",
          "pageParam": "page",
          "maxPages": 20
        }
      },
      "authorPage": {
        "storyLinks": {
          "strategy": "href-pattern",
          "pattern": "/s/[^/]+$",
          "searchWithin": "main, #content, .stories-list"
        }
      }
    },
    
    "mcstories.com": {
      "story": {
        "title": "title",
        "titleTransform": "remove-suffix: - MCStories.com",
        "author": "meta[name='dcterms.creator']",
        "authorAttribute": "content",
        "content": "article#mcstories",
        "summary": "meta[name='dcterms.description']",
        "summaryAttribute": "content"
      },
      "authorPage": {
        "storyLinks": "a[href$='.html']:not([href*='Authors'])",
        "linkPrefix": "https://mcstories.com/"
      }
    },
    
    "docs-lab.com": {
      "story": {
        "title": "title",
        "titleTransform": "remove-suffix: - Doc's Lab",
        "author": "a[href*='/profiles/'] strong",
        "content": {
          "strategy": "html-between",
          "startMarker": "<h2>Story</h2>",
          "endMarker": "</div>",
          "includeStart": false
        },
        "tags": "span.label"
      },
      "authorPage": {
        "storyLinks": "a[href*='/submissions/']",
        "linkPrefix": "https://docs-lab.com"
      }
    },
    
    "archiveofourown.org": {
      "story": {
        "title": "h2.title",
        "author": "a[rel='author']",
        "content": {
          "strategy": "chapters",
          "chapterSelector": "div.userstuff[role='article']",
          "chaptersWrapper": "#chapters",
          "singleChapter": "#workskin"
        },
        "summary": "div.summary blockquote.userstuff",
        "tags": {
          "strategy": "multiple-types",
          "selectors": {
            "fandom": "dd.fandom a.tag",
            "warning": "dd.warning a.tag",
            "category": "dd.category a.tag",
            "relationship": "dd.relationship a.tag",
            "character": "dd.character a.tag",
            "freeform": "dd.freeform a.tag"
          }
        },
        "multiPage": {
          "enabled": true,
          "strategy": "chapter-navigation",
          "chapterListSelector": "#chapter_index option",
          "urlPattern": "/chapters/{chapterId}"
        }
      },
      "authorPage": {
        "storyLinks": "h4.heading a[href*='/works/']",
        "pagination": {
          "enabled": true,
          "nextPageSelector": "li.next a[rel='next']"
        }
      }
    },
    
    "fanfiction.net": {
      "story": {
        "title": "#profile_top b.xcontrast_txt",
        "author": "#profile_top a[href*='/u/']",
        "content": "#storytext",
        "summary": "#profile_top div.xcontrast_txt",
        "coverImage": {
          "strategy": "lazy-loaded",
          "selector": "img.cimage",
          "attribute": "data-original"
        },
        "multiPage": {
          "enabled": true,
          "strategy": "chapter-dropdown",
          "chapterSelector": "select#chap_select option",
          "urlPattern": "{baseUrl}/{chapterNumber}"
        }
      },
      "authorPage": {
        "storyLinks": "div.z-list a.stitle",
        "metadata": {
          "strategy": "sibling-text",
          "metadataSelector": "div.z-padtop2",
          "parsePattern": "Rated: ([^-]+) - .+ - Chapters: (\\d+)"
        }
      }
    },
    
    "royalroad.com": {
      "story": {
        "title": "h1[property='name']",
        "author": "h4[property='author'] a",
        "content": {
          "strategy": "chapter-content",
          "selector": "div.chapter-content",
          "cleanupSelectors": [".portlet", ".ads-holder", "div[style*='display:none']"]
        },
        "summary": "div.description div.hidden-content",
        "tags": "span.tags a.fiction-tag",
        "coverImage": "img.thumbnail",
        "coverImageAttribute": "src",
        "multiPage": {
          "enabled": true,
          "strategy": "table-of-contents",
          "tocSelector": "table#chapters tbody tr a[href*='/chapter/']",
          "requiresAuth": false
        }
      },
      "authorPage": {
        "storyLinks": "div.fiction-list-item h2.fiction-title a",
        "additionalInfo": {
          "strategy": "data-attributes",
          "statsSelector": "div.stats",
          "extractStats": ["pages", "followers", "views"]
        }
      }
    },
    
    "wattpad.com": {
      "story": {
        "title": "h1",
        "author": {
          "strategy": "schema-org",
          "schemaType": "Person",
          "property": "name",
          "fallbackSelector": "a[href*='/user/']"
        },
        "content": {
          "strategy": "react-content",
          "contentClass": "pre-wrap",
          "paragraphSelector": "p[data-p-id]",
          "requiresJavaScript": true
        },
        "summary": "h2.description",
        "tags": "div.tag-items a.tag",
        "coverImage": {
          "strategy": "responsive-image",
          "selector": "img[alt*='cover']",
          "srcsetAttribute": "srcset",
          "selectLargest": true
        },
        "multiPage": {
          "enabled": true,
          "strategy": "api-based",
          "apiPattern": "/v4/parts/{partId}/text",
          "tocApiPattern": "/v5/stories/{storyId}/parts",
          "requiresAuth": true
        }
      },
      "authorPage": {
        "storyLinks": {
          "strategy": "infinite-scroll",
          "initialSelector": "a[href*='/story/']",
          "apiEndpoint": "/v4/users/{userId}/stories",
          "requiresJavaScript": true
        }
      }
    },
    
    "wanderinginn.com": {
      "story": {
        "title": "h1.entry-title",
        "author": "pirateaba",
        "content": ".entry-content",
        "summary": "meta[property='og:description']",
        "summaryAttribute": "content"
      }
    }
  },
  
  "strategies": {
    "text-blocks": {
      "description": "Find content by looking for large text blocks",
      "implementation": "Find all text nodes, group by parent, select parent with most text"
    },
    "link-with-path": {
      "description": "Find links containing specific path patterns",
      "implementation": "querySelector with href*= or iterate and check .href property"
    },
    "href-pattern": {
      "description": "Match links by regex pattern",
      "implementation": "Array.from(links).filter(a => pattern.test(a.href))"
    },
    "text-pattern": {
      "description": "Extract text using regex from raw HTML",
      "implementation": "Use regex on .html() with proper groups"
    },
    "html-between": {
      "description": "Extract HTML between markers",
      "implementation": "indexOf() to find positions, substring to extract"
    },
    "chapters": {
      "description": "Extract story content that may be in chapters",
      "implementation": "Check for multiple chapters or single chapter format"
    },
    "multiple-types": {
      "description": "Extract different categories of tags",
      "implementation": "Map over selector types and extract each category"
    },
    "chapter-navigation": {
      "description": "Navigate through chapters using chapter index",
      "implementation": "Extract chapter IDs and construct URLs"
    },
    "lazy-loaded": {
      "description": "Extract images that are lazy-loaded",
      "implementation": "Check data-* attributes for actual image source"
    },
    "chapter-dropdown": {
      "description": "Handle stories with chapter selection dropdown",
      "implementation": "Parse dropdown options and construct chapter URLs"
    },
    "table-of-contents": {
      "description": "Extract chapters from a table of contents",
      "implementation": "Find all chapter links in TOC structure"
    },
    "schema-org": {
      "description": "Extract data from schema.org structured data",
      "implementation": "Parse JSON-LD or microdata for specific properties"
    },
    "react-content": {
      "description": "Extract content from React-rendered pages",
      "implementation": "May require JavaScript execution or API access"
    },
    "responsive-image": {
      "description": "Select best quality from responsive images",
      "implementation": "Parse srcset and select highest resolution"
    },
    "api-based": {
      "description": "Use API endpoints instead of HTML scraping",
      "implementation": "Detect API patterns and make direct API calls"
    },
    "infinite-scroll": {
      "description": "Handle pages with infinite scroll",
      "implementation": "Detect scroll API endpoints or pagination"
    }
  },
  
  "globalOptions": {
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
    "timeout": 30000,
    "retryAttempts": 3,
    "rateLimitMs": 1000,
    "cacheDuration": 300000,
    "javascriptTimeout": 10000
  },
  
  "siteNotes": {
    "wattpad.com": {
      "warning": "Wattpad has aggressive anti-scraping measures. Consider using their API if available.",
      "requiresAuth": "Some stories may require login to access full content"
    },
    "royalroad.com": {
      "note": "Very scraper-friendly with good HTML structure"
    },
    "archiveofourown.org": {
      "note": "Respects robots.txt, has good semantic HTML",
      "rateLimit": "Be extra respectful of rate limits"
    },
    "fanfiction.net": {
      "note": "Older site with simpler HTML structure",
      "warning": "Known to block IPs for aggressive scraping"
    },
    "wanderinginn.com": {
      "note": "WordPress-based site with consistent structure",
      "author": "All stories by pirateaba - uses text pattern matching for content extraction"
    }
  }
}