---
id: simpleanime
name: SimpleAnime
description: "SimpleAnime is a CHINESE Public torrent tracker for ANIME"
language: zh-CN
type: public
encoding: UTF-8
links:
  - https://www.36dm.org/

caps:
  categories:
    Anime: TV/Anime

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

settings: []

download:
  # cant use magnet directly, generates Invalid non-ASCII or control character in header: 0x79BB
  infohash:
    hash:
      selector: a[href^="magnet:?xt="]
      attribute: href
      filters:
        - name: regexp
          args: ([A-F|a-f|0-9]{40})
    title:
      selector: h4
      filters:
        - name: trim
        - name: validfilename

search:
  paths:
    # https://www.36dm.org/
    # https://www.36dm.org/search-gene_20ai.htm
    - path: "{{ if .Keywords }}search-{{ .Keywords }}-1.htm{{ else }}/{{ end }}"
  keywordsfilters:
    - name: replace
      args: [" ", "_20"]

  rows:
    selector: ul.threadlist > li:not(:has(a[href="thread-338792.htm"])):not(:has(a[href="thread-342865.htm"])):not(:has(a[href="thread-290995.htm"]))

  fields:
    category:
      text: Anime
    title:
      selector: a[href^="thread-"]
    details:
      selector: a[href^="thread-"]
      attribute: href
    download:
      selector: a[href^="thread-"]
      attribute: href
    date_elapsed:
      selector: span.date:contains("前")
      optional: true
      filters:
        - name: replace
          args: ["秒前", " seconds ago"]
        - name: replace
          args: ["分钟前", " minutes ago"]
        - name: replace
          args: ["小时前", " hours ago"]
        - name: replace
          args: ["天前", " days ago"]
        - name: replace
          args: ["月前", " months ago"]
        - name: replace
          args: ["年前", " years ago"]
        - name: timeago
    date_added:
      selector: span.date:not(:contains("前"))
      optional: true
      filters:
        - name: append
          args: " +08:00" # CST
        - name: dateparse
          args: "yyyy-M-d zzz"
    date:
      text: "{{ if or .Result.date_elapsed .Result.date_added }}{{ or .Result.date_elapsed .Result.date_added }}{{ else }}now{{ end }}"
    size:
      text: 512MB
    seeders:
      text: 1
    leechers:
      text: 1
    downloadvolumefactor:
      text: 0
    uploadvolumefactor:
      text: 1
# BBS 4.0.4
