autobrr/internal/indexer/definitions/btfiles.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

89 lines
2.7 KiB
YAML

---
#id: btfiles
name: BitTorrentFiles
identifier: btfiles
description: BitTorrentFiles (BTF) is a GERMAN private torrent tracker for MOVIES / TV / GENERAL.
language: en-us
urls:
- https://bittorrentfiles.me/
privacy: private
protocol: torrent
supports:
- irc
- rss
# source: custom
settings:
- name: rsskey
type: secret
required: true
label: RSS key
help: "The rsskey in your RSS feed link"
irc:
network: BitTorrentFiles
server: btf-irc.us.to
port: 7001
tls: true
channels:
- "#~Tracer~"
announcers:
- Tracer
settings:
- name: nick
type: text
required: true
label: Nick
help: Bot nick. Eg. user_bot
- name: auth.account
type: text
required: true
label: NickServ Account
help: NickServ account. Make sure to group your user and bot. Ask staff to unlock it!
- name: auth.password
type: secret
required: true
label: NickServ Password
help: NickServ password
parse:
type: single
lines:
- tests:
- line: '[XXX » HD] Some.Porno.22.08.16.Famous.Actress.XXX.1080p.MP4-GROUP [ 3,00 GB | Pred 2022-08-16 08:47:31 (GMT) | URL: https://bittorrentfiles.me/details.php?id=0000000 ]'
expect:
category: XXX » HD
tags: ""
torrentName: Some.Porno.22.08.16.Famous.Actress.XXX.1080p.MP4-GROUP
torrentSize: 3,00 GB
baseUrl: https://bittorrentfiles.me/
torrentId: "0000000"
- line: '[Music » Single] [Dance Hall] Artist-Album-WEB-2021-GROUP [ 63,09 MB | Pred 2022-08-16 08:58:06 (GMT) | URL: https://bittorrentfiles.me/details.php?id=0000000 ]'
expect:
category: Music » Single
tags: Dance Hall
torrentName: Artist-Album-WEB-2021-GROUP
torrentSize: 63,09 MB
baseUrl: https://bittorrentfiles.me/
torrentId: "0000000"
- line: '[Sports » HD] Sports.League.2022.08.15.Team1.vs.Team2.720p.WEB.h264-GROUP [ 6,26 GB | Pred 2022-08-16 08:46:25 (GMT) | URL: https://bittorrentfiles.me/details.php?id=0000000 ]'
expect:
category: Sports » HD
tags: ""
torrentName: Sports.League.2022.08.15.Team1.vs.Team2.720p.WEB.h264-GROUP
torrentSize: 6,26 GB
baseUrl: https://bittorrentfiles.me/
torrentId: "0000000"
pattern: '\[(.*?)\] (?:\[(.*)\] )?(.*) \[ ([\d\.,]+ \w+) \| Pred .+ \| URL\: (https?\:\/\/[^\/]+\/).*[&\?]id=(\d+) \]'
vars:
- category
- tags
- torrentName
- torrentSize
- baseUrl
- torrentId
match:
infourl: "/details.php?id={{ .torrentId }}"
torrenturl: "/download.php?torrent={{ .torrentId }}&k={{ .rsskey }}&ssl=1"