autobrr/internal/indexer/definitions/torrentday.yaml
Frederick Robinson fef0da5711
feat(definitions): add expectations for test lines (#1257)
* factor out test helpers

* refactor, add tests for animebytes

* revert test refactor

* better name

* change format, migrate some examples

* migrated remaining test cases

* add comment about `Test` vs `Tests`

* refactor

* reorder expectations to match vars

* generate

* turn on strict unmarshalling, remove old `Test` from schema

* start modifying actual definitions

* done with the As

* Bs

* C, D

* E, F

* G, H, I, ... L

* M, N

* O, P

* R

* bonus error. without this, pattern/vars disagreement can panic.

* S

* T, U

* X.. Now we know our ABCs next time won't you sing with meeeee

* fix another test

* another driveby change

* be less strict parsing custom definitions

* fix(definitions): load custom definitions

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2023-11-18 15:41:39 +01:00

91 lines
2.5 KiB
YAML

---
#id: torrentday
name: TorrentDay
identifier: torrentday
description: TorrentDay (TD) is a private torrent tracker for GENERAL.
language: en-us
urls:
- https://www.torrentday.com/
- https://tday.love/
- https://secure.torrentday.com/
- https://classic.torrentday.com/
- https://torrentday.it/
- https://td.findnemo.net/
- https://td.getcrazy.me/
- https://td.venom.global/
- https://td.workisboring.net/
privacy: private
protocol: torrent
supports:
- irc
- rss
# source: custom
settings:
- name: passkey
type: secret
required: true
label: Passkey
help: "Create a RSS Link to find out your PASSKEY"
irc:
network: TorrentDay
server: irc.torrentday.com
port: 6697
tls: true
channels:
- "#td.announce"
announcers:
- TD_Announce
settings:
- name: nick
type: text
required: true
label: Nick
help: Bot nick. Eg. user_autodl
- name: auth.account
type: text
required: false
label: NickServ Account
help: NickServ account. Make sure to group your user and bot.
- name: auth.password
type: secret
required: false
label: NickServ Password
help: NickServ password
parse:
type: single
lines:
- tests:
- line: '[Movie/4K] This is a Movie 2160p UHD BluRay x265-TEST - https://www.torrentday.com/details.php?id=0000000 - 5.83 GB'
expect:
category: Movie/4K
torrentName: This is a Movie 2160p UHD BluRay x265-TEST
freeleech: ""
baseUrl: https://www.torrentday.com/
torrentId: "0000000"
torrentSize: 5.83 GB
- line: '[Movie/4K] This is a Movie 2160p UHD BluRay x265-TEST FREELEECH - https://www.torrentday.com/details.php?id=0000000 - 5.83 GB'
expect:
category: Movie/4K
torrentName: This is a Movie 2160p UHD BluRay x265-TEST
freeleech: FREELEECH
baseUrl: https://www.torrentday.com/
torrentId: "0000000"
torrentSize: 5.83 GB
pattern: '\[([^\]]*)] (.*?)\s*(FREELEECH)*\s*-\s+(https?\:\/\/[^\/]+\/).*[&\?]id=(\d+)\s*- (.*)'
vars:
- category
- torrentName
- freeleech
- baseUrl
- torrentId
- torrentSize
match:
infourl: "/details.php?id={{ .torrentId }}"
torrenturl: "/download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?torrent_pass={{ .passkey }}"
encode:
- torrentName