diff --git a/src/Jackett.Common/Definitions/torrentz2k.yml b/src/Jackett.Common/Definitions/torrentz2k.yml index 64b751d25..1dfd46e8e 100644 --- a/src/Jackett.Common/Definitions/torrentz2k.yml +++ b/src/Jackett.Common/Definitions/torrentz2k.yml @@ -6,21 +6,23 @@ language: en-us type: public encoding: UTF-8 links: + - https://torrentz2k.pw/ +legacylinks: - https://torrentz2k.xyz/ caps: categories: - book: Books - film: Movies - gamepad: Console - list: Other - male: XXX + movies: Movies + games: Console + xxx: XXX music: Audio - sellsy: Audio/Lossless - play-circle: TV - smile-o: TV/Anime - television: TV - wrench: PC + anime: TV/Anime + tv: TV + applications: PC + apps: PC + windows: PC/0day + android: PC/Phone-Android + other: Other modes: search: [q] @@ -31,7 +33,6 @@ caps: settings: [] search: - # https://torrentz2k.xyz/search/ paths: - path: search/ method: post @@ -56,26 +57,34 @@ search: fields: category: - selector: i - attribute: class + selector: a[href^="/category/"] + attribute: href filters: - - name: append - args: " list" - # extract the second class - name: split - args: [" ", 1] - # remove fa- prefix - - name: replace - args: ["fa-", ""] + args: ["/", 2] title: - selector: button + selector: span.btntitle attribute: title details: - # details page is only accessible via form and post which Cardigann does not support. - text: / - download: - selector: a[href^="magnet:?xt="] + selector: td > a attribute: href + _magnetfilename: # convert title to valid magnet filename + text: "{{ .Result.title }}" + filters: + - name: validfilename + - name: urlencode + # the magnet is burried in a tertiary page, so we build our own instead + magnet: # generate magnet link from details page link + optional: true + selector: td > a + attribute: href + filters: + - name: replace + args: ["/", ""] + - name: prepend + args: "magnet:?xt=urn:btih:" + - name: append + args: "&dn={{ .Result._magnetfilename }}.torrent&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://tracker.opentrackr.org:1337" date: selector: td:nth-child(5) filters: