---
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: 157, cat: TV/Documentary, desc: "Doku 1080p"}
    - {id: 156, cat: TV/Documentary, desc: "Doku 720p"}
    - {id: 155, cat: TV/Documentary, desc: "Doku SD x264/x265"}
    - {id: 152, cat: Books, desc: "E-Books"}
    - {id: 141, cat: Movies/HD, desc: "Filme HD 1080p"}
    - {id: 154, cat: Movies/HD, desc: "Filme HD 720p"}
    - {id: 139, cat: Movies/HD, desc: "Filme Packs HD 1080p"}
    - {id: 106, cat: Movies/HD, desc: "Filme Packs HD 720p"}
    - {id: 105, cat: Movies/SD, desc: "Filme Packs SD x264/x265"}
    - {id: 119, cat: Movies/UHD, desc: "Filme Packs UHD 2160p"}
    - {id: 153, cat: Movies/SD, desc: "Filme SD x264/x265"}
    - {id: 140, cat: Movies/UHD, desc: "Filme UHD 2160p"}
    - {id: 104, cat: Movies/HD, desc: "Filmklassiker HD 1080p"}
    - {id: 103, cat: Movies/HD, desc: "Filmklassiker HD 720p"}
    - {id: 124, cat: Movies/HD, desc: "Filmklassiker Packs HD 1080p"}
    - {id: 121, cat: Movies/HD, desc: "Filmklassiker Packs HD 720p"}
    - {id: 123, cat: Movies/UHD, desc: "Filmklassiker Packs UHD 2160p"}
    - {id: 127, cat: Movies/SD, desc: "Filmklassiker Packs  x264/x265"}
    - {id: 102, cat: Movies/SD, desc: "Filmklassiker SD x264/x265"}
    - {id: 135, cat: Movies/UHD, desc: "Filmklassiker UHD 2160p"}
    - {id: 118, cat: Audio/Audiobook, desc: "Hörbücher"}
    - {id: 109, cat: Audio/Lossless, desc: "Musik Flac"}
    - {id: 129, cat: Audio/MP3, desc: "Musik MP3"}
    - {id: 111, cat: Audio/Lossless, desc: "Musik Packs Flac"}
    - {id: 112, cat: Audio/MP3, desc: "Musik Packs MP3"}
    - {id: 113, cat: TV/HD, desc: "Serie HD 1080p"}
    - {id: 125, cat: TV/HD, desc: "Serie HD 720p"}
    - {id: 115, cat: TV/Foreign, desc: "Serie International"}
    - {id: 138, cat: TV/HD, desc: "Serie Packs HD 1080p"}
    - {id: 116, cat: TV/HD, desc: "Serie Packs HD 720p"}
    - {id: 144, cat: TV/Foreign, desc: "Serie Packs International"}
    - {id: 137, cat: TV/SD, desc: "Serie Packs SD x264/x265"}
    - {id: 143, cat: TV/UHD, desc: "Serie Packs UHD 2160p"}
    - {id: 133, cat: TV/SD, desc: "Serie SD x264/x265"}
    - {id: 114, cat: TV/UHD, desc: "Serie UHD 2160p"}
    - {id: 150, cat: PC/0day, desc: "Windows Apps"}
    - {id: 149, cat: PC/Games, desc: "Windows Spiele"}
    - {id: 147, cat: XXX/x264, desc: "XXX HD 1080p"}
    - {id: 146, cat: XXX/x264, desc: "XXX HD 720p"}
    - {id: 148, cat: XXX/Pack, desc: "XXX Packs"}
    - {id: 69, cat: XXX/SD, desc: "XXX SD x264/x265"}
    - {id: 151, cat: Books/Mags, desc: "Zeitschriften"}

  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: pin
    type: text
    label: Pin
  - name: freeleech
    type: checkbox
    label: Filter FreeLeech only
    default: false
  - name: onlyupload
    type: checkbox
    label: Filter OnlyUpload only
    default: false
  - name: info_free
    type: info
    label: About Freeleech and OnlyUpload at Fantastic Heaven
    default: "<ul><li>FreeLeech are torrents where neither the download or upload is counted. (On the Jackett dashboard search results these are tagged as NoUpload).</li><li>OnlyUpload are torrents where download is not counted but upload is. Good for building your Ratio up. (On the Jackett dashboard search results these are tagged as Freeleech).</li></ul>"
  - 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
  - name: info_tpp
    type: info
    label: Results Per Page
    default: For best results, change the <b>Torrents pro Seite:</b> setting to <b>100</b> on your Control Panel. The default is <i>15</i>.

login:
  path: login.php
  method: form
  form: form[action="../takelogin.php"]
  cookies: ["JAVA=OK"] # avoid jscheck redirect
  inputs:
    username: "{{ .Config.username }}"
    password: "{{ .Config.password }}"
    secure_pin: "{{ .Config.pin }}"
  error:
    - selector: table.tableinborder:contains("Anmeldung Gescheitert!") > tbody > tr > td.tablea
  test:
    path: index.php
    selector: a[href="logout.php"]

search:
  paths:
    - path: browse.php
  inputs:
    $raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
    showsearch: 1
    search: "{{ .Keywords }}"
    # 0 active, 1 all, 2 dead
    incldead: 1
    orderby: "{{ .Config.sort }}"
    sort: "{{ .Config.type }}"

  rows:
    selector: "table.tableinborder[cellspacing=\"1\"][cellpadding=\"0\"] > tbody > tr:has(a[href^=\"download.php\"]){{ if .Config.freeleech }}:has(img[src=\"pic/freeleech.gif\"]){{ else }}{{ end }}{{ if .Config.onlyupload }}:has(img[src=\"pic/oupic.gif\"]){{ else }}{{ end }}"

  fields:
    category:
      selector: a[href^="browse.php?cat="]
      attribute: href
      filters:
        - name: querystring
          args: cat
    title:
      selector: a[href^="details.php?id="] > b
    details:
      selector: a[href^="details.php?id="]
      attribute: href
    download:
      selector: a[href^="download.php?torrent="]
      attribute: href
    poster:
      selector: div[id^="details"] img
      attribute: src
    size:
      selector: td.content_wrap table tbody tr:nth-child(2) td:nth-child(1) b:nth-child(1)
    files:
      selector: td.content_wrap table tbody tr:nth-child(2) td:nth-child(1) b:nth-child(2)
    seeders:
      selector: td.content_wrap table tbody tr:nth-child(2) td:nth-child(2) b:nth-child(1)
    leechers:
      selector: td.content_wrap table tbody tr:nth-child(2) td:nth-child(2) > b:nth-of-type(2)
    grabs:
      selector: td.content_wrap table tbody tr:nth-child(2) td:nth-child(3) b:nth-child(1)
    date:
      selector: td.content_wrap table tbody tr:nth-child(2) td:nth-child(5)
      filters:
        - name: append
          args: " +01:00" # CET
        - name: replace
          args: ["\xA0", " "]
        - name: dateparse
          args: "dd.MM.yyyy HH:mm:ss zzz"
    downloadvolumefactor:
      case:
        img[src="pic/oupic.gif"]: 0 # only upload is counted
        "*": 1
    uploadvolumefactor:
      case:
        img[src="pic/freeleech.gif"]: 0 # nothing is counted
        "*": 1
# engine n/a
