---
id: swarmazon
name: Swarmazon
description: "Swarmazon is a Private Torrent Tracker for MOVIES / TV / GENERAL"
language: en-US
type: private
encoding: UTF-8
links:
  - https://swarmazon.club/

caps:
  categorymappings:
    - {id: 1, cat: Movies, desc: "Movies"}
    - {id: 2, cat: TV, desc: "Television"}
    - {id: 3, cat: Other, desc: "Video Courses"}
    - {id: 4, cat: Audio, desc: "Music"}
    - {id: 5, cat: PC/Games, desc: "Games"}
    - {id: 6, cat: PC, desc: "Software"}
    - {id: 7, cat: TV/Anime, desc: "Anime"}
    - {id: 8, cat: Books/EBook, desc: "E-Books"}
    - {id: 9, cat: Audio/Audiobook, desc: "Audio Books"}
    - {id: 10, cat: Books/Comics, desc: "Comics"}

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

login:
  path: en/account/login.php
  method: form
  form: form
#  captcha:
#    type: image
#    selector: img[alt="CAPTCHA"]
#    input: captcha_challenge
  inputs:
    username: "{{ .Config.username }}"
    password: "{{ .Config.password }}"
    remember: 1
  error:
#    - selector: script:contains("The Captcha")
#      message:
#        text: The Captcha you entered was incorrect.
    - selector: script:contains("Wrong")
      message:
        text: Wrong username or password.
    - selector: script:contains("not found")
      message:
        text: User not found.
  test:
    path: forum/

search:
  paths:
    - path: "{{ if .Keywords }}en/search/search.php?category=all&query={{ .Keywords }}{{ else }}latest.php?date_range=14{{ end }}"

  rows:
    selector: table.table-striped > tbody > tr
    filters:
      - name: andmatch

  fields: # some users (rank specific?) have an extra column (td:nth-child(4)) with bookmark features
    categorydesc:
      selector: td.Name small
      filters:
        - name: re_replace
          args: ["(.+?)in\\s(.+?)", "$2"]
        - name: replace
          args: ["Freeleech", ""]
        - name: replace
          args: ["Seeding", ""]
        - name: replace
          args: ["Downloaded", ""]
        - name: replace
          args: ["Leeching", ""]
        - name: trim
    title:
      selector: a[href*="/view/torrent.php?hash="]
    details:
      selector: a[href*="/view/torrent.php?hash="]
      attribute: href
    download:
      selector: a[href^="/api/download.php?hash="]
      attribute: href
    size:
      selector: td:nth-last-child(6)
    date:
      selector: td:nth-last-child(5)
      filters:
        - name: append
          args: " -07:00" # PDT
        - name: dateparse
          args: "2006-01-02 15:04:05 -07:00"
    grabs:
      selector: td:nth-last-child(4)
    seeders:
      selector: td:nth-last-child(3)
    leechers:
      selector: td:nth-last-child(2)
    downloadvolumefactor:
      case:
        "span.badge:contains(\"Freeleech\")": 0
        "*": 1
    uploadvolumefactor:
      text: 1
    minimumratio:
      text: 1.1
# Engine n/a
