name: "Mature.nl"
sceneByURL: &byUrl
  - action: scrapeXPath
    url:
      - mature.nl/
    scraper: sceneScraper
galleryByURL: *byUrl
sceneByFragment:
  action: scrapeXPath
  queryURL: "{url}"
  scraper: sceneScraper

xPathScrapers:
  sceneScraper:
    common:
      $url: //link[@rel="canonical"]/@href
    scene:
      URL: &url
        selector: $url
        postProcess:
          - replace:
              - regex: (^https?:\/\/(?:www\.)?mature\.nl\/..\/update\/\d+)\/.+
                with: $1
      Code:
        selector: $url
        postProcess:
          - replace:
              - regex: .+\/update\/(\d+)\/.+
                with: $1
      Title: &title //div[@class="box"]/h1/text()
      Details: &details
        selector: //div/span[text()="Synopsis:"]/following-sibling::text() | //meta[@name="description"]/@content
        postProcess:
          - replace:
              - regex: " Watch this amazing porn video on mature.nl as a member today!"
                with:
      Tags: &tags
        Name: //div[@id="divPageUpdateNiches"]/a[contains(@class, "tag")]/text()
      Performers: &performers
        Name:
          # This method is easier, but the names here are in uppercase
          # selector: //div[contains(@class,"card-label")]/a/text()
          selector: //div[@class="box-cnt"]//span[@class="col-accent"]/following-sibling::text()
          postProcess:
            - replace:
                - regex: \s\(\w+\)
                  with:
                - regex: \s\(EU\)
                  with:
                - regex: " & "
                  with: ", "
                - regex: (\w)\.,
                  with: $1,
          split: ", "
      Image:
        selector: (//video/@poster | //span[@id="spnPageUpdateTrailer"]/a/img/@data-src | //img[@class="img-responsive lazy"][1]/@data-src)[1]
      Date: &date
        selector: //span[@class="val-m"][1]
        postProcess:
          - replace:
              - regex: ^(\d{1,2}-\d{1,2}-\d{4}).*$
                with: $1
          - parseDate: 2-1-2006
      Studio: &studio
        Name:
          fixed: "Mature.nl"
    gallery:
      URL: *url
      Title: *title
      Details: *details
      Tags: *tags
      Performers: *performers
      Date: *date
      Studio: *studio
# Last Updated July 11, 2023
