---
id: mediamaatjes
name: MediaMaatjes
description: "MediaMaatjes is a DUTCH Private Torrent Tracker for MOVIES / TV / GENERAL"
language: nl-NL
type: private
encoding: UTF-8
links:
  - https://www.mediamaatjes.org/

caps:
  categorymappings:
    - {id: 43, cat: Movies/UHD, desc: "4k Films"}
    - {id: 41, cat: TV/Documentary, desc: "Documentaire"}
    - {id: 40, cat: Other, desc: "kerst"}
    - {id: 15, cat: Other, desc: "Overige"}
    - {id: 1, cat: Other, desc: "Afbeeldingen"}
    - {id: 19, cat: TV, desc: "TV Series"}
    - {id: 21, cat: TV/HD, desc: "Series/MKV"}
    - {id: 23, cat: Audio/Video, desc: "Cabaret"}
    - {id: 24, cat: Books/EBook, desc: "E-Books"}
    - {id: 30, cat: Movies, desc: "Classic"}
    - {id: 31, cat: Audio/Audiobook, desc: "Luisterboek"}
    - {id: 32, cat: Movies/HD, desc: "Films/HD 720p"}
    - {id: 33, cat: Audio, desc: "NL Muziek"}
    - {id: 34, cat: Books/Comics, desc: "Stripboeken"}
    - {id: 36, cat: Books/Mags, desc: "E Magazine"}
    - {id: 18, cat: TV/SD, desc: "Series/XVID"}
    - {id: 17, cat: PC/Games, desc: "PC Spellen"}
    - {id: 16, cat: PC, desc: "PC Software"}
    - {id: 2, cat: Movies/HD, desc: "Films/HD 1080p"}
    - {id: 4, cat: Audio/Video, desc: "DVD Muziek"}
    - {id: 3, cat: Movies/DVD, desc: "DVD Kids"}
    - {id: 5, cat: Movies/DVD, desc: "DVD Films"}
    - {id: 7, cat: Movies/SD, desc: "DVD Promo/R5"}
    - {id: 8, cat: XXX, desc: "Erotiek"}
    - {id: 9, cat: PC/Mobile-Other, desc: "GSM/Navigatie"}
    - {id: 10, cat: Audio, desc: "Muziek Album"}
    - {id: 11, cat: Audio, desc: "Muziek Diverse"}
    - {id: 13, cat: Console/Wii, desc: "Wii"}

  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: freeleech
    type: checkbox
    label: Filter freeleech only
    default: false
  - name: thankyou
    type: text
    label: Thank You Comment
  - name: info
    type: info
    label: Thank you comment
    default: This site requires you to leave a Thank You comment before you can download. Enter your personalised comment above.

login:
  path: takelogin.php
  method: post
  inputs:
    username: "{{ .Config.username }}"
    password: "{{ .Config.password }}"
  error:
    - selector: table.main:contains("Aanmelden mislukt")
  test:
    path: /
    selector: a[href="logout.php"]

download:
  before:
    # https://www.mediamaatjes.org/comment.php?action=add&tid=166386
    path: comment.php
    method: post
    inputs:
      action: add
      tid: "{{ .DownloadUri.Query.id }}"
      text: "{{ .Config.thankyou }}"
  selectors:
    - selector: a[href^="download.php?id="]
      attribute: href

search:
  paths:
    # https://www.mediamaatjes.org/browse.php?search=&cat=43&incldead=1
    - path: browse.php
  inputs:
    $raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
    search: "{{ .Keywords }}"
    incldead: 1
    # does not support imdbid search and does not return imdb link in results

  rows:
    selector: "table.mainouter{{ if .Config.freeleech }}:has(img[src=\"pic/freedlfsu.gif\"]){{ else }}{{ end }}"
    filters:
      - name: andmatch

  fields:
    category:
      selector: a[href^="browse.php?cat="]
      attribute: href
      filters:
        - name: querystring
          args: cat
    title:
      selector: a[href^="details.php?id="]
      filters:
        - name: re_replace
          args: ["(?i)seizoen\\s*(\\d{1,2})\\s*(tot|t\/m)\\s*(\\d{1,2})", "S$1-$3"]
        - name: re_replace
          args: ["(?i)(seizoen\\s*)(\\d{1,2})", "S$2"]
        - name: re_replace
          args: ["(?i)(afl.\\s*|aflevering\\s*)(\\d{1,2})", "E$2"]
        - name: re_replace
          args: ["(?i)compleet", "Complete"]
    details:
      selector: a[href^="details.php?id="]
      attribute: href
    download:
      selector: a[href^="details.php?id="]
      attribute: href
    size:
      selector: a[href^="details_bestanden.php?torrent_id="]
      filters:
        - name: regexp
          args: "(.+?) in"
    files:
      selector: a[href^="details_bestanden.php?torrent_id="]
      filters:
        - name: regexp
          args: "in (\\d+) bestan"
    grabs:
      selector: table table tr:nth-child(2) td:nth-child(1)
    date:
      selector: table table tr:nth-child(2) td:nth-child(2)
      filters:
        - name: replace
          args: ["januari", "January"]
        - name: replace
          args: ["februari", "February"]
        - name: replace
          args: ["maart", "March"]
        - name: replace
          args: ["april", "April"]
        - name: replace
          args: ["mei", "May"]
        - name: replace
          args: ["juni", "June"]
        - name: replace
          args: ["juli", "July"]
        - name: replace
          args: ["augustus", "August"]
        - name: replace
          args: ["september", "September"]
        - name: replace
          args: ["oktober", "October"]
        - name: replace
          args: ["november", "November"]
        - name: replace
          args: ["december", "December"]
        - name: re_replace
          args: ["\\s*om\\s*", " "]
        - name: append
          args: " +01:00" # CET
        - name: dateparse
          args: "2 January 2006 15:04:05 -07:00"
    seeders_optional:
      optional: true
      selector: table tr:nth-child(3) td:nth-child(5)  font b
    seeders:
      text: "{{ if .Result.seeders_optional }}{{ .Result.seeders_optional }}{{ else }}0{{ end }}"
    leechers_optional:
      optional: true
      selector: table tr:nth-child(3) td:nth-child(5) font b:nth-child(2)
    leechers:
      text: "{{ if .Result.leechers_optional }}{{ .Result.leechers_optional }}{{ else }}0{{ end }}"
    downloadvolumefactor:
      case:
        img[src="pic/freedlfsu.gif"]: 0
        "*": 1
    uploadvolumefactor:
      text: 1
    minimumratio:
      text: 1.0
# engine n/a
