---
  site: iloveclassics
  name: I Love Classics
  description: "Classics movie tracker"
  language: en-us
  type: private
  encoding: UTF-8
  links:
    - http://www.iloveclassics.com/

  caps:
    categorymappings:
      - {id: 1, cat: Movies, desc: "Action/Adventure"}
      - {id: 22, cat: Movies, desc: "Animation"}
      - {id: 18, cat: Movies, desc: "Audio"}
      - {id: 2, cat: Movies, desc: "Comedy"}
      - {id: 12, cat: Movies, desc: "Crime/Mystery"}
      - {id: 4, cat: Movies, desc: "Documentary"}
      - {id: 3, cat: Movies, desc: "Drama"}
      - {id: 24, cat: Movies, desc: "E-Book"}
      - {id: 9, cat: Movies, desc: "Family"}
      - {id: 23, cat: Movies, desc: "Fantasy"}
      - {id: 6, cat: Movies, desc: "Film Noir"}
      - {id: 7, cat: Movies, desc: "Film Short"}
      - {id: 8, cat: Movies, desc: "Horror"}
      - {id: 10, cat: Movies, desc: "Martial Arts"}
      - {id: 11, cat: Movies, desc: "Musical"}
      - {id: 20, cat: Movies, desc: "Other"}
      - {id: 13, cat: Movies, desc: "Romance"}
      - {id: 5, cat: Movies, desc: "Sci-Fi"}
      - {id: 14, cat: Movies, desc: "Silent"}
      - {id: 15, cat: Movies, desc: "Thriller"}
      - {id: 19, cat: Movies, desc: "TV Shows"}
      - {id: 16, cat: Movies, desc: "War"}
      - {id: 17, cat: Movies, desc: "Western"}

    modes:
      search: [q]

  login:
    path: takelogin.php
    method: post
    inputs:
      username: "{{ .Config.username }}"
      password: "{{ .Config.password }}"
    error:
      - selector: table:contains("Login failed!")
    test:
      path: index.php

  download:
    selector: a[href^="download.php?id="]
        
  search:
    paths:
      - path: browse.php
    inputs:
      $raw: "{{range .Categories}}filter_cat[{{.}}]=1&{{end}}"
      search: "{{ .Query.Keywords }}"
    rows:
      selector: table#hover-over > tbody > tr.table_col1
      filters:
        - name: andmatch
    fields:
      category:
        selector: a[href^="browse.php?cat="]
        attribute: href
        filters:
          - name: querystring
            args: cat
      title:
        selector: td:nth-child(2) a
      download:
        selector: a[href^="details.php?id="]
        attribute: href
        filters:
          - name: replace
            args: ["details.php?id=", "download.php?id="]
      details:
        selector: a[href^="details.php?id="]
        attribute: href
      grabs:
        selector: td:nth-child(9)
        filters:
          - name: regexp
            args: (\d+\s+)(?=x)
      files:
        selector: td:nth-child(4)
      size:
        selector: td:nth-child(9)
        filters:
          - name: regexp
            args: (\d+.*(MB|GB)+)
      seeders:
        selector: td:nth-child(6)
      leechers:
        selector: td:nth-child(7)
      date:
        selector: td:nth-child(2)
      downloadvolumefactor:
        case:
          "img[title=\"This Torrent is on Free Leech. Download amounts do not count to your ratio\"]": "0"
          "img[title=\"This Torrent is Free Leech because it has 5 or more seeders. Download amounts do not count to your ratio while 5 seeders remain\"]": "0"
          "*": "1"
      uploadvolumefactor:
        case:
          "*": "1"