---
id: masters-tb
name: Masters-TB
description: "Masters-TB is a BULGARIAN Semi-Private Torrent Tracker for 0DAY / GENERAL"
language: bg-BG
type: semi-private
encoding: windows-1251
links:
  - https://masters-tb.com/

caps:
  categorymappings:
    - {id: 23, cat: TV/Anime, desc: "Анимации"}
    - {id: 56, cat: PC/Mobile-Android, desc: "Android"}
    - {id: 53, cat: Books/EBook, desc: "e-Books"}
    - {id: 17, cat: Console, desc: "Игри/конзоли"}
    - {id: 4, cat: PC/Games, desc: "Игри/PC ISO"}
    - {id: 21, cat: PC/Games, desc: "Игри/PC Rip"}
    - {id: 1, cat: PC/ISO, desc: "Програми/PC ISO"}
    - {id: 22, cat: PC, desc: "Програми/други"}
    - {id: 57, cat: TV, desc: "Препоръчано MastersTB"}
    - {id: 57, cat: Movies, desc: "Препоръчано MastersTB"}
    - {id: 6, cat: Audio, desc: "Музика"}
    - {id: 12, cat: Audio/Video, desc: "Музика/Видео"}
    - {id: 33, cat: Audio/Video, desc: "Музика/DVD-R"}
    - {id: 52, cat: Audio/Lossless, desc: "Музика/Lossless"}
    - {id: 35, cat: TV, desc: "Сериали/BoxSet"}
    - {id: 7, cat: TV, desc: "Сериали/TV"}
    - {id: 32, cat: Movies, desc: "Филми/БГ"}
    - {id: 55, cat: Movies, desc: "Филми/Asian"}
    - {id: 36, cat: Movies, desc: "Филми/BoxSet"}
    - {id: 28, cat: Movies, desc: "Филми/Руски"}
    - {id: 34, cat: Movies/DVD, desc: "Филми/Руски DVD-R"}
    - {id: 20, cat: Movies/DVD, desc: "Филми/DVD-R"}
    - {id: 37, cat: Movies/HD, desc: "Филми/HD"}
    - {id: 30, cat: TV/Sport, desc: "Филми/Спорт"}
    - {id: 19, cat: Movies/SD, desc: "Филми/XviD"}
    - {id: 29, cat: TV/Documentary, desc: "Филми/Документални"}
    - {id: 54, cat: TV, desc: "TV Show"}
    - {id: 2, cat: Other, desc: "Други"}

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

settings:
  - name: cookie
    type: text
    label: Cookie
  - name: info_cookie
    type: info_cookie
  - name: freeleech
    type: checkbox
    label: Filter freeleech only
    default: false
  - name: sort
    type: select
    label: Sort requested from site
    default: 4
    options:
      4: created
      7: seeders
      5: size
      1: 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>Tоренти на страница:</b> setting to <b>100</b> on your account profile. The default is <i>20</i>.

login:
  method: cookie
  inputs:
    cookie: "{{ .Config.cookie }}"
  test:
    path: index.php
    selector: a[href="logout.php"]

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

  rows:
    selector: "table[width=\"65%\\\"\"]:nth-child(3) > tbody > tr[onmouseover]{{ if .Config.freeleech }}:has(img[src=\"pic/freeleech.png\"]){{ else }}{{ end }}"

  fields:
    category:
      selector: a[href^="browse.php?cat="]
      attribute: href
      filters:
        - name: querystring
          args: cat
    title_default:
      selector: a[href^="download.php?id="]
      attribute: href
      filters:
        - name: querystring
          args: name
        - name: regexp
          args: ^(.+?)\.torrent
        - name: htmldecode
    title:
      selector: a[href^="details.php?id="]
      optional: true
      default: "{{ .Result.title_default }}"
    details:
      selector: a[href^="details.php?id="]
      attribute: href
    download:
      selector: a[href^="download.php?id="]
      attribute: href
    magnet:
      selector: a[href^="magnet:?xt="]
      optional: true
      attribute: href
    poster:
      selector: a[href^="details.php?id="]
      attribute: onmouseover
      filters:
        - name: regexp
          args: src=([^\s]+)
        - name: replace
          args: ["pic/not-available.jpg>');", ""]
    files:
      selector: td:nth-last-child(8)
    date:
      # 2023-05-19<br/>14:10:17
      selector: td:nth-last-child(6)
      filters:
        - name: append
          args: " +02:00" # EET
        - name: dateparse
          args: "yyyy-MM-ddHH:mm:ss zzz"
    size:
      selector: td:nth-last-child(4)
    grabs:
      selector: td:nth-last-child(3)
    seeders:
      selector: td:nth-last-child(2)
    leechers:
      selector: td:nth-last-child(1)
    downloadvolumefactor:
      case:
        img[src="pic/freeleech.png"]: 0
        "*": 1
    uploadvolumefactor:
      text: 1
    minimumratio:
      text: 1.0
    description:
      selector: td:has(a[href^="details.php?id="])
      remove: a
# engine tbd
