name: AdultFilmIndex
sceneByURL:
  - action: scrapeJson
    url:
      - https://adultfilmindex.com/movie/
    scraper: sceneScraper
    queryURL: https://adultfilmindex.com/api/v1/stash/scene/{url}
    queryURLReplace:
      url:
        - regex: '.+/movie/([^/]+)/([^/]+)/scene/([^/]+)$'
          with: "${3}"
sceneByName:
  action: scrapeJson
  queryURL: https://adultfilmindex.com/api/v1/stash/scene_search/{}
  scraper: sceneSearch
sceneByQueryFragment:
  action: scrapeJson
  queryURL: "{url}"
  scraper: sceneScraper
sceneByFragment:
  action: scrapeJson
  queryURL: https://adultfilmindex.com/api/v1/stash/scene_fragment_search/{filename}/{oshash}
  scraper: sceneScraper
movieByURL:
  - action: scrapeJson
    url:
      - https://adultfilmindex.com/movie/
    scraper: movieScraper
    queryURL: https://adultfilmindex.com/api/v1/stash/movie/{url}
    queryURLReplace:
      url:
        - regex: '.+/movie/([^/]+)/.+$'
          with: "${1}"
jsonScrapers:
  sceneSearch:
    scene:
      Title: data.#.title
      Date: data.#.release_date
      Image: data.#.thumbnail
      URL: data.#.url
      Details: data.#.description
  sceneScraper:
    scene:
      Title: data.title
      Details: data.description
      URL: data.url
      Image: data.thumbnail
      Date:
        selector: data.movie.release_date
        postProcess:
          - replace:
              - regex: T.*$
                with: ""
          - parseDate: 2006-01-02
      Movies:
        Name: data.movie.title
      Performers:
        Name: data.actors.#.name
      Studio:
        Name: data.movie.studio.name
      Tags:
        Name: data.tags.#.name
  movieScraper:
    movie:
      Name: data.title
      Synopsis: data.description
      URL: data.url
      Duration: data.runtime
      Date:
        selector: data.release_date
        postProcess:
          - replace:
              - regex: T.*$
                with: ""
          - parseDate: 2006-01-02
      Studio:
        Name: data.studio.name
      FrontImage: data.front_cover
      BackImage: data.back_cover
driver:
  headers:
    - Key: User-Agent
      Value: stashjson/1.0.0
    - Key: Authorization # Beta key, enabled and active for now
      Value: Bearer 4vY0iwSUVPH5cGAX1AUZarJ8pbuDUK53
# Last Updated February 05, 2022
