Files
nocodeandClaude Opus 5.5 971e1db036 Initial commit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 13:53:14 +01:00

164 lines
5.8 KiB
YAML
Executable File

---
id: 1ptbar-api
name: 1ptbar (API)
description: "1ptbar is a CHINESE Private Torrent Tracker for MOVIES / TV / E-LEARNING"
language: zh-CN
type: private
encoding: UTF-8
links:
- https://1ptba.com/
caps:
categorymappings:
- {id: 401, cat: Movies, desc: "Movie(電影)"}
- {id: 402, cat: TV, desc: "TV Series(電視影劇)"}
- {id: 403, cat: TV, desc: "TV Shows(電視綜藝)"}
- {id: 404, cat: TV/Documentary, desc: "Documentaries(紀錄教育)"}
- {id: 405, cat: TV/Anime, desc: "Animations(卡通動漫)"}
- {id: 406, cat: Audio/Video, desc: "Music Videos(音樂短片/演唱會)"}
- {id: 407, cat: TV/Sport, desc: "Sports(體育賽事)"}
- {id: 408, cat: Audio, desc: "HQ Audio(高品质音频)"}
- {id: 410, cat: PC/0day, desc: "Software(軟體)"}
- {id: 411, cat: PC/Games, desc: "Games(電子遊戲)"}
- {id: 412, cat: Books/EBook, desc: "eBook(電子書)"}
- {id: 409, cat: Other, desc: "Misc(其他)"}
- {id: 610, cat: XXX/x264, desc: "AV(有碼)/HD Censored"}
- {id: 611, cat: XXX/x264, desc: "AV(無碼)/HD Uncensored"}
- {id: 612, cat: XXX/SD, desc: "AV(有碼)/SD Censored"}
- {id: 613, cat: XXX/SD, desc: "AV(無碼)/SD Uncensored"}
- {id: 614, cat: XXX/DVD, desc: "AV(無碼)/DVDiSo Uncensored"}
- {id: 615, cat: XXX/DVD, desc: "AV(有碼)/DVDiSo Censored"}
- {id: 616, cat: XXX/UHD, desc: "AV(有碼)/Blu-Ray Censored"}
- {id: 617, cat: XXX/UHD, desc: "AV(無碼)/Blu-Ray Uncensored"}
- {id: 618, cat: XXX/Pack, desc: "AV(網站)/0Day"}
- {id: 619, cat: XXX/Pack, desc: "IV(寫真影集)/Video Collection"}
- {id: 620, cat: XXX/ImageSet, desc: "IV(寫真圖集)/Picture Collection"}
- {id: 621, cat: XXX/Other, desc: "H-Game(遊戲)"}
- {id: 622, cat: XXX/Other, desc: "H-Anime(動畫)"}
- {id: 623, cat: XXX/Other, desc: "H-Comic(漫畫)"}
- {id: 624, cat: XXX/Other, desc: "Adult film(成人電影)"}
- {id: 625, cat: XXX/Other, desc: "AV(Gay)/HD"}
modes:
search: [q]
tv-search: [q, season, ep]
movie-search: [q]
music-search: [q]
book-search: [q]
settings:
- name: apikey
type: text
label: API Token
- name: info_apikey
type: info
label: About your API Token
default: "Find/Generate an API token from your <a href=\"https://1ptba.com/usercp.php\" target=\"_blank\">1ptbar</a> account control panel."
- name: passkey
type: text
label: Passkey
- name: info_passkey
type: info
label: About your Passkey
default: "Find the Passkey from your account control panel."
- name: freeleech
type: checkbox
label: Filter freeleech only
default: false
- name: sort
type: select
label: Sort requested from site
default: "-id"
options:
"-id": created
"-seeders": seeders
"-size": size
"-times_completed": grabs
- name: info_activity
type: info
label: Account Inactivity
default: "Cherish your user account. Inactive accounts would be deleted based on the following rules:<ol><li>Veteran User or above would never be deleted.</li><li>Elite User or above would never be deleted if parked (at User CP).</li><li>Parked accounts would be deleted if users have not logged in for more than 400 days in a row.</li><li>Unparked accounts would be deleted if users have not logged in for more than 150 days in a row.</li><li>Accounts with both uploaded and downloaded amount being 0 would be deleted if users have not logged in for more than 100 days in a row.</li></ol>"
- name: info_special
type: info
label: Special Categories
default: "Only <b>Power User</b> or above can view Special section. Searching for XXX categories by users below this class will result in search errors."
login:
path: api/v1/torrents
method: get
inputs:
per_page: 1
error:
- selector: :root:contains("login.php?returnto")
message:
text: "The API token was not accepted by {{ .Config.sitelink }}."
- selector: :root:contains("Unauthenticated")
message:
text: "The API token was not accepted by {{ .Config.sitelink }}."
search:
paths:
- path: api/v1/torrents
response:
type: json
headers:
Authorization: ["Bearer {{ .Config.apikey }}"]
inputs:
$raw: "{{ range .Categories }}&filter[category][in][]={{.}}{{end}}"
"filter[title]": "{{ .Keywords }}"
sorts: "{{ .Config.sort }}"
per_page: 100
keywordsfilters:
# the site stores dotted release names but the title filter matches on words
- name: re_replace
args: ["\\.", " "]
rows:
selector: "data.data{{ if .Config.freeleech }}:not(promotion_info.down_multiplier:contains(1)):not(promotion_info.down_multiplier:contains(.)){{ else }}{{ end }}"
fields:
category:
selector: category
_id:
selector: id
title:
selector: name
details:
text: "{{ .Config.sitelink }}details.php?id={{ .Result._id }}&hit=1"
download:
text: "{{ .Config.sitelink }}download.php?id={{ .Result._id }}&passkey={{ .Config.passkey }}"
infohash:
selector: hash
poster:
selector: cover
description:
selector: small_descr
size:
selector: size
files:
selector: numfiles
seeders:
selector: seeders
leechers:
selector: leechers
grabs:
selector: times_completed
date:
# 2026-09-19 16:50
selector: added
filters:
- name: append
args: " +08:00" # CST
- name: dateparse
args: "yyyy-MM-dd HH:mm zzz"
downloadvolumefactor:
# promotion_info is the EFFECTIVE promotion and accounts for site-wide freeleech events.
# sp_state is only the stored per-torrent promotion, so it reads 1 on a torrent the site has made free.
selector: promotion_info.down_multiplier
uploadvolumefactor:
selector: promotion_info.up_multiplier
# JSON API NexusPHP v1.10.1 2026-02-17