---
id: pussytorrents
name: PussyTorrents
description: "PussyTorrents is a Semi-Private Torrent Tracker for 3X"
language: en-US
type: semi-private
encoding: UTF-8
links:
  - https://pussytorrents.org/

caps:
  categorymappings:
    - {id: 1, cat: XXX, desc: "XXX"}

  modes:
    search: [q]

settings:
  - name: username
    type: text
    label: Username
  - name: password
    type: password
    label: Password
  - name: sort
    type: select
    label: Sort requested from site
    default: added
    options:
      added: created
      seeders: seeders
      size: size
      nameSort: title
      score: score
  - name: type
    type: select
    label: Order requested from site
    default: desc
    options:
      desc: desc
      asc: asc
  - name: info_score
    type: info
    label: About sorting by score
    default: "In order to sort by score you first must have edited your <a href=\"https://pussytorrents.org/\" target=\"_blank\">PussyTorrents</a> account profile and changed <b>Results default sorting method</b> to <b>By Score</b>."

login:
  path: user/account/login/
  method: post
  inputs:
    username: "{{ .Config.username }}"
    password: "{{ .Config.password }}"
    remember_me: on
  error:
    - selector: div.alert-error
  test:
    path: /
    selector: a[href="/user/account/logout"]

search:
  # https://pussytorrents.org/torrents/browse?query=&page=1&order=desc&orderby=added
  paths:
    - path: torrents/browse
  inputs:
    query: "{{ .Keywords }}"
    page: 1
    orderby: "{{ if ne .Config.sort \"score\" }}{{ .Config.sort }}{{ else }}{{ end }}"
    order: "{{ if ne .Config.sort \"score\" }}{{ .Config.type }}{{ else }}{{ end }}"

  rows:
    selector: table#torrenttable > tbody > tr:has(a[href^="/download/"])
    filters:
      - name: andmatch

  fields:
    category:
      text: 1
    title:
      selector: a[href^="/torrent/"]
    details:
      selector: a[href^="/torrent/"]
      attribute: href
    download:
      selector: a[href^="/download/"]
      attribute: href
    date:
      selector: span.subnote
      filters:
        - name: replace
          args: ["Added on ", ""]
        - name: append
          args: " +00:00" # GMT
        - name: dateparse
          args: "yyyy-MM-dd HH:mm:ss zzz"
    size:
      selector: td:nth-last-child(5)
    grabs:
      selector: td:nth-last-child(4)
    seeders:
      selector: td:nth-last-child(3)
    leechers:
      selector: td:nth-last-child(2)
    description:
      selector: td.name
      remove: span.title, span.subnote
    downloadvolumefactor:
      text: 1
    uploadvolumefactor:
      text: 1
    minimumratio:
      text: 0.4
    minimumseedtime:
      # 60 hours (as seconds = 2.5 x 24 x 60 x 60)
      text: 216000
# engine n/a
