---
id: mononokebt
name: Mononoké-BT
description: "Mononoke-BT is a FRENCH Private Torrent Tracker for ANIME"
language: fr-fr
type: private
encoding: iso-8859-15
links:
  - http://mononoke-bt.org/
legacylinks:
  - https://mononoke-bt.org/ # downloads do not supported https

caps:
  categories:
    1: TV/Anime

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

settings:
  - name: cookie
    type: text
    label: Cookie
  - name: info
    type: info
    label: How to get the Cookie
    default: "<ol><li>Login to this tracker with your browser<li>Open the <b>DevTools</b> panel by pressing <b>F12</b><li>Select the <b>Network</b> tab<li>Click on the <b>Doc</b> button (Chrome Browser) or <b>HTML</b> button (FireFox)<li>Refresh the page by pressing <b>F5</b><li>Click on the first row entry<li>Select the <b>Headers</b> tab on the Right panel<li>Find <b>'cookie:'</b> in the <b>Request Headers</b> section<li><b>Select</b> and <b>Copy</b> the whole cookie string <i>(everything after 'cookie: ')</i> and <b>Paste</b> here.</ol>"
  - name: vostfr
    type: checkbox
    label: Add VOSTFR to titles
    default: false
  - name: IMPORTANT_FR
    type: info
    label: (FR) Informations Importantes
    default: Avant de pouvoir télécharger un torrent depuis Jackett, allez dans la <a href="https://mononoke-bt.org/faq.php" target="_blank">FAQ</a> et cliquer tous les 'Lu et Approuvé' de la page.
  - name: IMPORTANT_EN
    type: info
    label: (EN) Important infos
    default: Before you can even begin to download anything you need to go to the <a href="https://mononoke-bt.org/faq.php" target="_blank">FAQ</a> and click every 'Lu et Approuvé' present on the page.

login:
  method: cookie
  inputs:
    cookie: "{{ .Config.cookie }}"
  test:
    path: browse2.php

download:
  before:
    path: gettorrent.php
    method: get
    inputs:
      id: "{{ .DownloadUri.Query.id }}"

search:
  paths:
    - path: browse2.php
  inputs:
    search: "%{{ re_replace .Query.Keywords \"[^a-zA-Z0-9]+\" \"%\" }}%"
    incldead: 1

  rows:
    selector: table#torrentstable > tbody > tr:has(a[href^="details.php?id="])

  fields:
    category:
      text: 1
    title_normal:
      selector: a[href^="details.php?id="]
    title_vostfr:
      text: "{{ .Result.title_normal }} VOSTFR"
    title:
      text: "{{ if .Config.vostfr }}{{ .Result.title_vostfr }}{{ else }}{{ .Result.title_normal }}{{ end }}"
    details:
      selector: a[href^="details.php?id="]
      attribute: href
    download:
      selector: a[href^="gettorrent.php?id="]
      attribute: href
    poster:
      selector: a[href^="browse2.php?cat="] > img
      attribute: src
    files:
      selector: td:nth-child(6)
    date:
      selector: td:nth-child(9)
      filters:
        - name: append
          args: " +01:00" # CET
        - name: dateparse
          args: "2006-01-0215:04:05 -07:00"
    size:
      selector: td:nth-child(10)
      filters:
        - name: replace
          args: ["o", "b"]
    grabs:
      selector: td:nth-child(12)
    seeders:
      selector: td:nth-child(13)
    leechers:
      selector: td:nth-child(14)
    downloadvolumefactor:
      case:
        img[src="/pic/icons/cadeau1.png"]: 0
        img[src="/pic/icons/cadeau2.png"]: 0
        img[src="/pic/icons/cadeau3.png"]: 0
        "*": 1
    uploadvolumefactor:
      text: 1
# engine tbd
