---
id: gaytorrentru
name: GAYtorrent.ru
description: "GayTorrent.ru is a Private Torrent Tracker for GAY 3X"
language: en-US
type: private
encoding: UTF-8
links:
  - https://www.gaytor.rent/
legacylinks:
  - https://www.gaytorrent.ru/

settings:
  - name: username
    type: text
    label: Username
  - name: password
    type: password
    label: Password
  - name: freeleech
    type: checkbox
    label: Search freeleech only
    default: false
  - name: info
    type: info
    label: "Hidden categories"
    default: "Results for categories hidden in account profile will not be visible."
  - 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

caps:
  categorymappings:
    - {id: 62, cat: XXX, desc: "Amateur"}
    - {id: 29, cat: XXX, desc: "Anal"}
    - {id: 46, cat: XXX, desc: "Anime Games"}
    - {id: 30, cat: XXX, desc: "Asian"}
    - {id: 43, cat: XXX, desc: "Bareback"}
    - {id: 19, cat: XXX, desc: "BDSM"}
    - {id: 17, cat: XXX, desc: "Bears"}
    - {id: 59, cat: XXX, desc: "Bisexual"}
    - {id: 44, cat: XXX, desc: "Black"}
    - {id: 50, cat: Books, desc: "Books & Magazines"}
    - {id: 9, cat: XXX, desc: "Chubbies"}
    - {id: 7, cat: XXX, desc: "Clips"}
    - {id: 48, cat: Books/Comics, desc: "Comic & Yaoi"}
    - {id: 5, cat: XXX, desc: "Daddies / Sons"}
    - {id: 67, cat: XXX, desc: "Dildos"}
    - {id: 66, cat: XXX, desc: "Fan Sites"}
    - {id: 34, cat: XXX, desc: "Fetish"}
    - {id: 68, cat: XXX, desc: "Fisting"}
    - {id: 27, cat: XXX, desc: "Grey / Older"}
    - {id: 32, cat: XXX, desc: "Group-Sex"}
    - {id: 63, cat: XXX, desc: "Homemade"}
    - {id: 12, cat: XXX, desc: "Hunks"}
    - {id: 33, cat: XXX/ImageSet, desc: "Images"}
    - {id: 53, cat: XXX, desc: "Interracial"}
    - {id: 57, cat: XXX, desc: "Jocks"}
    - {id: 35, cat: XXX, desc: "Latino"}
    - {id: 36, cat: XXX, desc: "Mature"}
    - {id: 58, cat: PC, desc: "Media Programs"}
    - {id: 37, cat: XXX, desc: "Member"}
    - {id: 54, cat: XXX, desc: "Middle Eastern"}
    - {id: 38, cat: XXX, desc: "Military"}
    - {id: 39, cat: XXX, desc: "Oral-Sex"}
    - {id: 64, cat: XXX, desc: "Scat"}
    - {id: 56, cat: XXX, desc: "Softcore"}
    - {id: 40, cat: XXX, desc: "Solo"}
    - {id: 61, cat: XXX, desc: "Straight older"}
    - {id: 60, cat: XXX, desc: "Straight younger"}
    - {id: 45, cat: Movies, desc: "Themed Movie"}
    - {id: 47, cat: XXX, desc: "Trans"}
    - {id: 1, cat: TV, desc: "TV / Episodes"}
    - {id: 41, cat: XXX, desc: "Twinks"}
    - {id: 42, cat: XXX, desc: "Vintage"}
    - {id: 51, cat: XXX, desc: "Voyeur"}
    - {id: 65, cat: XXX, desc: "Wrestling and Sports"}
    - {id: 28, cat: XXX, desc: "Youngblood"}

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

login:
  path: login.php
  method: form
  form: form[action="takelogin.php"]
  inputs:
    username: "{{ .Config.username }}"
    password: "{{ .Config.password }}"
  test:
    path: browse.php
    selector: a[href$="/logout.php"]

search:
  paths:
    - path: browse.php
  inputs:
    $raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
    search: "{{ .Keywords }}"
    # 0 active, 1 both, 2 dead
    incldead: 1
    # where to search: name      , descr      , filename , freeleech only ,  wishlist
    # where to search: inname=1, indesc=1, infn=1    , infl=1              ,   inbook=1
    inname: 1
    infl: "{{ if .Config.freeleech }}1{{ else }}{{ end }}"
    orderby: "{{ .Config.sort }}"
    sort: "{{ .Config.type }}"

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

  fields:
    category:
      selector: a[href^="browse.php?cat="]
      attribute: href
      filters:
        - name: querystring
          args: cat
    title:
      selector: .browsedesc > a
    details:
      selector: a[href^="details.php?id="]
      attribute: href
    _id:
      selector: a[href^="details.php?id="]
      attribute: href
      filters:
        - name: querystring
          args: id
    download:
      # turn href="download.php/0738d444362fa610a08fb87b5c1bec798ca1731adbf3175b/GUARATORO.torrent
      # into href="/download.php?id=0738d444362fa610a08fb87b5c1bec798ca1731adbf3175b&n=GUARATORO.torrent&p=dodownload
      text: "download.php?id={{ .Result._id }}&n={{ .Result.title }}.torrent&p=dodownload"
    poster:
      selector: a[href^="details.php?id="]
      attribute: onmouseover
      filters:
        - name: regexp
          args: "src=(.+?) "
    grabs:
      selector: .tsnatch
    files:
      selector: .tfiles
    size:
      selector: .tsize
    seeders:
      optional: true
      selector: a[href$="&toseeders=1"], span.red
    leechers:
      optional: true
      selector: a[href$="&todlers=1"]
    date:
      selector: .tadded
      # auto adjusted by site account profile
      filters:
        - name: re_replace
          args: ["(\\d{4}-\\d{2}-\\d{2})(\\d{2}:\\d{2}:\\d{2}).*", "$1 $2"]
        - name: dateparse
          args: "yyyy-MM-dd HH:mm:ss"
    downloadvolumefactor:
      case:
        "td:nth-child(3) > div > nobr > font[color=\"yellow\"]": 0
        "*": 1
    uploadvolumefactor:
      text: 1
    minimumratio:
      text: 1.0
# engine n/a
