---
id: huntorrent
replaces:
  - huntorrent-bithorlo
name: HunTorrent
description: "HunTorrent is a HUNGARIAN Semi-Private Torrent Tracker for MOVIES / TV / GENERAL"
language: hu-HU
type: semi-private
encoding: UTF-8
requestDelay: 2
links:
  - https://huntorrent.org/
legacylinks:
  - https://huntorrent.net/
  - https://huntorrent.eu/

caps:
  categorymappings:
    - {id: 28, cat: Movies/SD, desc: "Cam/Külföldi", default: true}
    - {id: 27, cat: Movies/SD, desc: "Cam/Magyar", default: true}
    - {id: 4, cat: Movies/DVD, desc: "DVDR/Külföldi", default: true}
    - {id: 3, cat: Movies/DVD, desc: "DVDR/Magyar", default: true}
    - {id: 6, cat: Movies/HD, desc: "HD/Külföldi", default: true}
    - {id: 5, cat: Movies/HD, desc: "HD/Magyar", default: true}
    - {id: 2, cat: Movies/SD, desc: "XviD/Külföldi", default: true}
    - {id: 1, cat: Movies/SD, desc: "XviD/Magyar", default: true}
    - {id: 17, cat: PC/Games, desc: "Játék/ISO", default: true}
    - {id: 18, cat: PC/Games, desc: "Játék/RIP", default: true}
    - {id: 19, cat: Console, desc: "Konzol", default: true}
    - {id: 25, cat: Other, desc: "Kép", default: true}
    - {id: 24, cat: Books, desc: "eBook/Külföldi", default: true}
    - {id: 23, cat: Books, desc: "eBook/Magyar", default: true}
    - {id: 38, cat: Audio/Audiobook, desc: "Hangoskönyv", default: true}
    - {id: 26, cat: PC/Mobile-Other, desc: "Mobil", default: true}
    - {id: 20, cat: PC/ISO, desc: "Program/ISO", default: true}
    - {id: 21, cat: PC/0day, desc: "Program/RIP", default: true}
    - {id: 31, cat: TV/HD, desc: "Sorozat/HD/Külföldi", default: true}
    - {id: 9, cat: TV/HD, desc: "Sorozat/HD/Magyar", default: true}
    - {id: 8, cat: TV/SD, desc: "Sorozat/Külföldi", default: true}
    - {id: 7, cat: TV/SD, desc: "Sorozat/Magyar", default: true}
    - {id: 13, cat: Audio/Video, desc: "Klip/Külföldi", default: true}
    - {id: 12, cat: Audio/Video, desc: "Klip/Külföldi", default: true}
    - {id: 11, cat: Audio/MP3, desc: "MP3/Külföldi", default: true}
    - {id: 10, cat: Audio/MP3, desc: "MP3/Magyar", default: true}
    - {id: 16, cat: XXX/DVD, desc: "XXX/DVD", default: false}
    - {id: 32, cat: XXX/x264, desc: "XXX/HD", default: false}
    - {id: 14, cat: XXX/ImageSet, desc: "XXX/Kép", default: false}
    - {id: 15, cat: XXX/SD, desc: "XXX/XVID", default: false}

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

settings:
  - name: cookie
    type: text
    label: Cookie
  - name: info_cookie
    type: info_cookie
  - name: useragent
    type: text
    label: User-Agent
  - name: info_useragent
    type: info_useragent
  - 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>Torrents per page:</b> setting to <b>100</b> on your account profile.

login:
  method: cookie
  # using cookie method because login page has embedded Google reCAPTCHA
  inputs:
    cookie: "{{ .Config.cookie }}"
  test:
    path: browse/
    selector: a[href*="logout.php?k="]

search:
  headers:
    User-Agent: ["{{ .Config.useragent }}"]
  paths:
    # https://huntorrent.net/browse/?korhatar=0&incldead=1&xyz=yes&c28=1&c27=1&c6=1&c5=1&sort=4&type=desc
    - path: browse/
      categories: [28, 27, 4, 3, 6, 5, 2, 1, 17, 18, 19, 25, 24, 23, 38, 26, 20, 21, 31, 9, 8, 7, 13, 12, 11, 10]
      inputs:
        search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
    - path: browse/xxx
      categories: [16, 32, 14, 15]
      inputs:
        search: "{{ .Keywords }}"
  inputs:
    $raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
    xyz: yes
    # Age Limit: 0 all, 1 no, 5 6, 2 12, 3 16, 4 18
    korhatar: 0
    # 0 active, 1 active+dead, 2 dead, 3 my uploads, 4 waiting for seed, 7 my bookmarks, 12 reseeded by me
    incldead: 1
    sort: "{{ .Config.sort }}"
    type: "{{ .Config.type }}"

  rows:
    selector: table.torrent-table > tbody > tr.torrent-row

  fields:
    category:
      selector: a[href*="/?cat="]
      attribute: href
      filters:
        - name: querystring
          args: cat
    title:
      selector: a.torrent-title-link
      attribute: data-name
    details:
      selector: a.torrent-title-link
      attribute: data-detail-url
    download:
      selector: a[href^="/download/"]
      attribute: href
    genre:
      selector: a[data-mufaj]
      attribute: data-mufaj
    description:
      selector: div.torrent-subtitle
      filters:
        - name: append
          args: "{{ if .Result.genre }}</br>{{ .Result.genre }}{{ else }}{{ end }}"
    imdbid:
      selector: a[href*="imdb.com/title/tt"]
      attribute: href
    poster:
      selector: a[data-poster]
      attribute: data-poster
      filters:
        - name: prepend
          args: "/"
    date:
      selector: a[data-added]
      attribute: data-added
      filters:
        - name: append
          args: " +01:00" # CET
        - name: dateparse
          args: "yyyy-MM-dd HH:mm zzz"
    size:
      selector: a[data-size]
      attribute: data-size
    grabs:
      selector: td:nth-last-child(3)
    seeders:
      selector: td:nth-last-child(2)
    leechers:
      selector: td:nth-last-child(1)
    downloadvolumefactor:
      text: 1
    uploadvolumefactor:
      text: 2
    minimumratio:
      text: 1.0
    minimumseedtime:
      # 32 hours (as seconds = 32 x 60 x 60)
      text: 115200
# engine n/a
