name: "HMV Mania"
sceneByURL:
  - action: scrapeXPath
    url:
      - hmvmania.com
    scraper: sceneScraper

sceneByName:
  action: scrapeXPath
  queryURL: https://hmvmania.com/?post_type=video&s={}
  scraper: sceneSearch
sceneByQueryFragment:
  action: scrapeXPath
  queryURL: "{url}"
  scraper: sceneScraper

xPathScrapers:
  sceneSearch:
    common:
      $searchItem: //div[contains(@class,"main-container")]//div[contains(@class,"video-item-horizontal")]
    scene:
      Title: $searchItem//h4/text()
      URL: $searchItem//a[h4]/@href
      Image: $searchItem//img[not(@class)]/@data-src
      Details: $searchItem//p/text()
  sceneScraper:
    common:
      $infoNode: //div[@class="main-container"]//div[@class="row"]/div[1]
    scene:
      URL: //link[@rel="canonical"]/@href|//meta[@property="og:url"]/@content
      Image: //meta[@property="og:image"]/@content
      Title:
        selector: $infoNode//h1[@class="video-entry-title"]/text()
        postProcess:
          - replace:
              - regex: '^\[.+\]\s(.+)'
                with: $1
      Studio:
        Name:
          selector: $infoNode//h1[@class="video-entry-title"]/text()
          postProcess:
            - replace:
                - regex: '^\[(.+)\]\s.+'
                  with: $1
        URL: $infoNode//div[contains(@class,"content-creator")]/div/a/@href
      Details:
        selector: $infoNode//div[contains(@class,"entry-content")]/p/text()
        concat: "\n"
        postProcess:
          - replace:
              - regex: "^HMV Maker: .+"
                with:
      Tags:
        Name: $infoNode//ul[contains(@class,"video-meta")]/li[i[contains(@class,"fa-tags")]]/a/text()
      Date:
        selector: $infoNode//ul[contains(@class,"video-meta")]/li[i[contains(@class,"fa-calendar-alt")]]/text()
        postProcess:
          - parseDate: "Jan 02 2006"
# Last Updated December 16, 2022
