---
id: lesbians4u
name: Lesbians4u
description: "Lesbians4u is a Private Torrent Tracker for 3X"
language: en-US
type: private
encoding: UTF-8
links:
  - http://lesbians4u.org/ # does not support https, CA invalid

caps:
  categorymappings:
    - {id: 7, cat: XXX, desc: "Amateur"}
    - {id: 12, cat: XXX, desc: "Anime &Hentai &JAV"}
    - {id: 17, cat: XXX, desc: "Appz"}
    - {id: 3, cat: XXX, desc: "Classics"}
    - {id: 6, cat: XXX, desc: "Clips &Siterips"}
    - {id: 16, cat: XXX, desc: "DVD"}
    - {id: 15, cat: XXX, desc: "EX-V.I.P. Torrents"}
    - {id: 9, cat: XXX, desc: "Fetish"}
    - {id: 8, cat: XXX, desc: "Games"}
    - {id: 11, cat: XXX, desc: "Misc."}
    - {id: 10, cat: XXX, desc: "Movie"}
    - {id: 5, cat: XXX, desc: "Solo"}
    - {id: 14, cat: XXX, desc: "V.I.P."}
    - {id: 13, cat: XXX, desc: "Watersport"}

  modes:
    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: sort
    type: select
    label: Sort requested from site
    default: added
    options:
      added: created
      seeders: seeders
      size: size
      name: title
  - name: type
    type: select
    label: Order requested from site
    default: desc
    options:
      desc: desc
      asc: asc

login:
  path: takelogin.php
  method: post
  inputs:
    username: "{{ .Config.username }}"
    password: "{{ .Config.password }}"
    logout: ""
  error:
    - selector: table:has(a[href*="login.php?error=1"])
      message:
        text: "ERROR: Incorrect username!"
    - selector: table:has(a[href*="login.php?error=4"])
      message:
        text: "ERROR: Incorrect password!"
    - selector: table:has(a[href*="login.php?error="])
      message:
        text: "ERROR: Something went wrong during login!"
  test:
    path: index.php
    selector: a[href*="/logout.php?logouthash="]

download:
  before:
    path: takethanks.php
    method: post
    inputs:
      torrentid: "{{ re_replace  .DownloadUri.PathAndQuery \".*torrent-details-(\\d+).*\" \"$1\"}}"
  selectors:
    - selector: a[href*="download-torrent-"]
      attribute: href

search:
  paths:
    - path: browse.php

  keywordsfilters:
    # prefix and postfix percent wildcard as well as replacing spaces between words
    - name: re_replace
      args: ["\\W+", "%"]
    - name: re_replace
      args: ["^(.+)$", "%$1%"]

  inputs:
    do: search
    keywords: "{{ .Keywords }}"
    # t_name, t_description, t_both, t_uploader, t_genre
    search_type: t_name
    # does not support multi category searching so defaulting to all.
    category: 0
    include_dead_torrents: yes
    sort: "{{ if .Config.freeleech }}free{{ else }}{{ .Config.sort }}{{ end }}"
    order: "{{ if .Config.freeleech }}asc{{ else }}{{ .Config.type }}{{ end }}"

  rows:
    selector: "table.sortable tr:has(a[href*=\"/download-torrent-\"]){{ if .Config.freeleech }}:has(img[src$=\"/freedownload.gif\"]){{ else }}{{ end }}"

  fields:
    category:
      selector: a[href*="torrent-category-"]
      attribute: href
      filters:
        - name: regexp
          args: torrent-category-(\d+)
    title_default:
      # is often abbreviated
      selector: a[href*="torrent-details-"]
    title:
      # usually longer than details title
      selector: div[id^="port-content-"] div
      optional: true
      default: "{{ .Result.title_default }}"
    details:
      selector: a[href*="torrent-details-"]
      attribute: href
    download:
      selector: a[href*="torrent-details-"]
      attribute: href
    poster:
      selector: div[id^="port-content-"] img
      attribute: src
    date:
      selector: td:nth-child(2) > div:last-child
      filters:
        - name: regexp
          args: (\d{2}-\d{2}-\d{4} \d{2}:\d{2})
        - name: append
          args: " +00:00" # auto adjusted by site account profile
        - name: dateparse
          args: "dd-MM-yyyy HH:mm zzz"
    size:
      selector: td:nth-child(5)
    grabs:
      selector: td:nth-child(6)
    seeders:
      selector: td:nth-child(7)
    leechers:
      selector: td:nth-child(8)
    downloadvolumefactor:
      case:
        img[src$="/freedownload.gif"]: 0
        img[src$="/silverdownload.gif"]: 0.5
        "*": 1
    uploadvolumefactor:
      case:
        img[src$="/x2.gif"]: 2
        "*": 1
    minimumratio:
      text: 1.0
# TS Special Edition v.7.3
