---
  site: zooqle
  name: Zooqle
  description: "Zooqle is a Public torrent index providing a huge database of verified torrents"
  language: en-us
  type: public
  encoding: UTF-8
  links:
    - https://zooqle.com

  caps:
    categories:
      "anime": TV/Anime
      "app": PC
      "book": Books
      "game": PC/Games
      "movies": Movies
      "music": Audio
      "other": Other/Misc
      "tv": TV

    modes:
      search: [q]
      tv-search: [q, season, ep]
      movie-search: [q]

  settings: []

  search:
    # if keyword is specified sorted by descending seeders otherwise by time
    # includes only verified torrents
    paths:
      - path: "/search?{{if .Keywords}}s=ns&v=t&sd=d&q={{ .Keywords}}{{else}}s=dt&v=t&sd=d&q= *{{end}}{{if .Categories}} category:{{range .Categories}}{{.}},{{end}}{{else}}{{end}}"
    rows:
      selector: tr:has(td[class^="text-muted3"])
      filters:
        - name: andmatch
    fields:
      title:
        selector: td:nth-child(2) a
      category:
        selector: td:nth-child(2) > i
        attribute: class
        filters:
          # extract the second class
          - name: split
            args: [" ", 1]
          # remove zqf- prefix
          - name: replace
            args: ["zqf-", ""]
      details:
        selector: td:nth-child(2) a
        attribute: href
      download:
        # .torrent urls can be missing 
        optional: true
        selector: a[title^="Generate .torrent"]
        attribute: href
      magnet:
        # magnets urls can be missing
        optional: true
        selector: a[title^="Magnet link"]
        attribute: href
      date:
        selector: td:nth-child(5)
        filters:
          # a date of 'long ago' causes the timeago filter to return '0m ago' which is contra
          - name: replace
            args: ["long ago", "99 years"]
          # a date of 'yesterday' causes the timeago filter to return '0m ago' which is contra
          - name: replace
            args: ["yesterday", "1 day"]
          - name: timeago
      size:
        selector: td:nth-child(4)
        filters:
          # a size of '– N/A –' causes Jackett to reject the row with an error
          - name: replace
            args: ["– N/A –", "0 Bytes"]
      seeders:
        # seeders can be missing
        optional: true
        selector: td:nth-child(6) div
        attribute: title
        filters:
          - name: split
            args: [" ", 1]
          - name: replace
            args: [",", ""]
      leechers:
        # leechers can be missing
        optional: true
        selector: td:nth-child(6) div 
        attribute: title
        filters:
          - name: split
            args: [" ", 4]
          - name: replace
            args: [",", ""]
      downloadvolumefactor:
        text: "0"
      uploadvolumefactor:
        text: "1"
