---
id: fantasticheaven
name: Fantastic Heaven
description: "Fantastic Heaven is a German Time based tracker"
language: de-DE
type: private
encoding: UTF-8
links:
  - https://fantastic-heaven.eu/

caps:
  categorymappings:
    - {id: 58, cat: Movies/SD, desc: "Filme SD"}
    - {id: 59, cat: Movies/HD, desc: "Filme 720p"}
    - {id: 60, cat: Movies/HD, desc: "Filme 1080p"}
    - {id: 61, cat: Movies/UHD, desc: "Filme 2160p"}
    - {id: 170, cat: Movies/BluRay, desc: "Filme Bluray"}
    - {id: 101, cat: Movies/DVD, desc: "Filme DVD"}
    - {id: 62, cat: Movies/3D, desc: "Filme 3D"}
    - {id: 169, cat: Movies/Foreign, desc: "Filme International"}
    - {id: 129, cat: Movies/SD, desc: "Filme Packs SD"}
    - {id: 130, cat: Movies/HD, desc: "Filme Packs 720p"}
    - {id: 131, cat: Movies/HD, desc: "Filme Packs 1080p"}
    - {id: 159, cat: Movies/UHD, desc: "Filme Packs 2160p"}
    - {id: 172, cat: Movies/SD, desc: "Film-Klassiker SD"}
    - {id: 173, cat: Movies/HD, desc: "Film-Klassiker 720p"}
    - {id: 174, cat: Movies/HD, desc: "Film-Klassiker 1080p"}
    - {id: 175, cat: Movies/UHD, desc: "Film-Klassiker 2160p"}
    - {id: 180, cat: Movies/DVD, desc: "Film-Klassiker DVD"}
    - {id: 181, cat: Movies/BluRay, desc: "Film-Klassiker Bluray"}
    - {id: 176, cat: Movies/SD, desc: "Film-Klassiker Pack SD"}
    - {id: 177, cat: Movies/HD, desc: "Film-Klassiker Pack 720p"}
    - {id: 178, cat: Movies/HD, desc: "Film-Klassiker Pack 1080p"}
    - {id: 179, cat: Movies/UHD, desc: "Film-Klassiker Pack 2160p"}
    - {id: 64, cat: TV/SD, desc: "Serien SD"}
    - {id: 65, cat: TV/HD, desc: "Serien 720p"}
    - {id: 66, cat: TV/HD, desc: "Serien 1080p"}
    - {id: 68, cat: TV/UHD, desc: "Serien 2160p"}
    - {id: 69, cat: TV/Foreign, desc: "Serien Ger-Subbed"}
    - {id: 167, cat: TV/Foreign, desc: "Serien International"}
    - {id: 76, cat: TV/SD, desc: "Serienpacks SD"}
    - {id: 77, cat: TV/HD, desc: "Serienpacks 720p"}
    - {id: 78, cat: TV/HD, desc: "Serienpacks 1080p"}
    - {id: 81, cat: TV/UHD, desc: "Serienpacks 2160p"}
    - {id: 79, cat: TV/Foreign, desc: "Serienpacks Ger-Subbed"}
    - {id: 71, cat: Audio/MP3, desc: "Audio MP3"}
    - {id: 72, cat: Audio/Lossless, desc: "Audio Flac"}
    - {id: 73, cat: Audio, desc: "Audio Packs"}
    - {id: 153, cat: Audio/Audiobook, desc: "Hörbücher"}
    - {id: 123, cat: PC, desc: "Software Windows"}
    - {id: 166, cat: PC/Mac, desc: "Software Sonstiges"}
    - {id: 132, cat: PC/Games, desc: "Spiele Windows"}
    - {id: 150, cat: PC/Mac, desc: "Spiele Sonstiges"}
    - {id: 90, cat: Books/Mags, desc: "Zeitschriften"}
    - {id: 89, cat: Books/EBook, desc: "E-Books"}
    - {id: 91, cat: XXX/SD, desc: "XXX SD"}
    - {id: 92, cat: XXX/x264, desc: "XXX 720p"}
    - {id: 93, cat: XXX/x264, desc: "XXX 1080p"}
    - {id: 171, cat: XXX/Pack, desc: "XXX Packs"}
    - {id: 94, cat: XXX/ImageSet, desc: "XXX Magazine"}

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

settings:
  - name: username
    type: text
    label: Username
  - name: password
    type: password
    label: Password
  - name: sort
    type: select
    label: Sort requested from site
    default: added
    options:
      added: created
      seeds: seeders
      size: size
      name: title
  - name: type
    type: select
    label: Order requested from site
    default: desc
    options:
      desc: desc
      asc: asc

login:
  path: login.php
  method: form
  form: form[action="/login.php"]
  cookies: ["JAVA=OK"] # avoid jscheck redirect
  captcha:
    type: image
    selector: img[src^="cap/captcha_math.php?codeCaptcha="]
    input: stringCaptcha
  inputs:
    username: "{{ .Config.username }}"
    password: "{{ .Config.password }}"
    loggiin: "einloggen"
  error:
    - selector: div#login_error
  test:
    path: index.php
    selector: a[href="logout.php"]

search:
  paths:
    - path: selection.php
  inputs:
    $raw: "{{ if .Categories }}{{ range .Categories }}scat[]={{.}}&{{end}}{{ else }}{{ end }}"
    search: "{{ .Keywords }}"
    blah: 0
    orderby: "{{ .Config.sort }}"
    sort: "{{ .Config.type }}"

  rows:
    selector: div.content_wrap > div.selection_wrap:has(a[href^="details.php?id="])

  fields:
    category:
      selector: a[href^="selection.php?cat="]
      attribute: href
      filters:
        - name: querystring
          args: cat
        - name: replace
          args: ["#2", ""]
    title:
      selector: a[href^="details.php?id="]
    details:
      selector: a[href^="details.php?id="]
      attribute: href
    download:
      selector: a[href^="download.php?torrent="]
      attribute: href
    grabs:
      selector: div.selection_unter_ae
    size:
      selector: div.selection_unter_ad
    seeders:
      selector: div.selection_unter_aa > b
    leechers:
      selector: div.selection_unter_aaa > b
    date:
      selector: div.selection_unter_ab
      filters:
        - name: replace
          args: ["um ", ""]
        - name: append
          args: " +01:00" # CET
        - name: dateparse
          args: "02.01.2006 15:04:05 -07:00"
    downloadvolumefactor:
      text: 1
    uploadvolumefactor:
      text: 1
# engine n/a
