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

79 lines
2.2 KiB
YAML

---
#id: tracker68
name: BIT-HDTV
identifier: bithdtv
description: Bit-HDTV (BHDTV) is a specialized HD tracker in movies and TV with so many daily uploads.
language: en-us
urls:
- https://www.bit-hdtv.com/
privacy: private
protocol: torrent
supports:
- irc
- rss
# source: custom
settings:
- name: passkey
type: secret
required: true
label: Pass key
help: "Your passkey"
regex: /([\da-z]{32})
irc:
network: P2P-Network
server: irc.p2p-network.net
port: 6697
tls: true
channels:
- "#bit-hdtv"
announcers:
- BHD-bot
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.
- name: auth.password
type: secret
required: true
label: NickServ Password
help: NickServ password
parse:
type: single
lines:
- tests:
- line: 'New torrent: Fear.the.walking.bee.s01e01.720p.WEB.h264-lemoncakes | Cat.: TV | WEB-DL | 720p | Uploader: ze0s | https://www.bit-hdtv.com/details.php?id=448412837123'
expect:
torrentName: Fear.the.walking.bee.s01e01.720p.WEB.h264-lemoncakes
category: TV
uploader: ze0s
baseUrl: https://www.bit-hdtv.com/
torrentId: "448412837123"
- line: 'New torrent: Y.r.u.there.2022.1080p.BluRay.DDP5.1.x264-egg | Cat.: Movies | Encode x264 | 1080p | Uploader: Anonymous | https://www.bit-hdtv.com/details.php?id=69'
expect:
torrentName: Y.r.u.there.2022.1080p.BluRay.DDP5.1.x264-egg
category: Movies
uploader: Anonymous
baseUrl: https://www.bit-hdtv.com/
torrentId: "69"
pattern: 'New torrent: (.*) \|\s*Cat.: ([^\|]*) \| .* Uploader: (.*) \| (https?\:\/\/[^\/]+\/).*id=(\d+)'
vars:
- torrentName
- category
- uploader
- baseUrl
- torrentId
match:
infourl: "/details.php?id={{ .torrentId }}"
torrenturl: "/rssdownload.php?id={{ .torrentId }}&passkey={{ .passkey }}"