Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cpasbien indexer by category #505

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 171 additions & 0 deletions definitions/v11/cpasbien-by-cat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
---
id: cpasbien-by-cat
name: cpasbien-by-cat
description: "cpasbien is a FRENCH Public site for TV/MOVIES/GENERAL. For best results, only one category will be accepted at a time. Tips: Combined with tags, you can create an indexer by App."
language: fr-FR
type: public
encoding: UTF-8
followredirect: false
links:
- https://www.cpasbien.do/
legacylinks:
- https://www.cpasbiens.cz/
- https://www.cpasbiens.bz/
- https://www.cpasbien.vg/
- https://www.cpasbien.lol/
- https://www.gktorrent.biz/
- https://vww.cpasbien-fr.fr/
- https://wvw.cpasbien-fr.fr/
- https://wwwv.cpasbien-fr.fr/
- https://www2.cpasbien-fr.fr/
- https://www.cpasbien-fr.nz/
- https://vwwvwvwvvw.cpasbien-fr.nz/
- https://cpasbiens3.fr/
- https://labastidevivante.fr/
- https://cpasbiens911.fr/
- https://jardattraction.fr/
- https://cpasbien-vf.fr/
- https://cpasbien-vf.pics/
- https://cpasbien-vf.li/

caps:
categorymappings:
- {id: films, cat: Movies, desc: "Movies"}
- {id: series, cat: TV, desc: "TV"}
- {id: musique, cat: Audio, desc: "Music"}
- {id: ebook, cat: Books, desc: "Books"}
- {id: logiciels, cat: PC, desc: "Software"}
- {id: jeux-pc, cat: PC/Games, desc: "PC Games"}
- {id: other, cat: Other, desc: "Other"} # dummy cat for results missing icon

modes:
search: [q]
tv-search: [q, season, ep]
movie-search: [q]

settings:
- name: info_flaresolverr
type: info_flaresolverr
- name: multilang
type: checkbox
label: Replace MULTi by another language in release name
default: false
- name: category
type: select
label: Searching category
default: films
options:
films: Movies
series: TV
musique: Audio
ebook: Books
logiciels: PC
jeux-pc: PC/Games

- name: multilanguage
type: select
label: Replace MULTi by this language
default: FRENCH
options:
FRENCH: FRENCH
MULTi FRENCH: MULTi FRENCH
ENGLISH: ENGLISH
MULTi ENGLISH: MULTi ENGLISH
VOSTFR: VOSTFR
MULTi VOSTFR: MULTi VOSTFR
- name: vostfr
type: checkbox
label: Replace VOSTFR and SUBFRENCH with ENGLISH
default: false

download:
selectors:
- selector: a[href^="magnet:?xt="]
attribute: href

search:
paths:
- path: "{{ if .Keywords }}recherche/films/{{ .Keywords }}{{ else }}home/{{ end }}"
categories: [films]
- path: "{{ if .Keywords }}recherche/series/{{ .Keywords }}{{ else }}home/{{ end }}"
categories: [series]
- path: "{{ if .Keywords }}recherche/{{ .Keywords }}{{ else }}home/{{ end }}"
categories: ["!", films, series]
keywordsfilters:
# if searching for season packs with S01 to saison 1 #9712
- name: re_replace
args: ["(?i)(S0)(\\d{1,2})$", "saison $2"]
- name: re_replace
args: ["(?i)(S)(\\d{1,3})$", "saison $2"]
- name: replace
args: [" ", "-"]

headers:
# site blocks Linux UAs, so slightly alter the Windows UA here (e.g. Safari/537.36 > Safari/537.35)
User-Agent: ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.35"]

rows:
selector: div#gauche > table > tbody > tr:has(a), div#dle-content > a.cover2
filters:
- name: andmatch

fields:
category:
text: "{{ .Config.category }}"
title_phase1_title:
selector: a
title_phase1_url:
selector: a
attribute: href
filters:
- name: regexp
args: torrents\d+\/(.+?)\/
- name: replace
args: ["-", " "]
title_phase1:
text: "{{ if .Result.title_phase1_title }}{{ .Result.title_phase1_title }}{{ else }}{{ .Result.title_phase1_url }}{{ end }}"
filters:
- name: re_replace
args: ["(?i)\\b(FRENCH|MULTI|TRUEFRENCH|VOSTFR|SUBFRENCH)\\b(.+?)(\\b(19|20\\d{2})\\b)$", "$3 $1$2"]
title_vostfr:
text: "{{ .Result.title_phase1 }}"
filters:
- name: re_replace
args: ["(?i)\\b(vostfr|subfrench)\\b", "ENGLISH"]
title_phase2:
text: "{{ if .Config.vostfr }}{{ .Result.title_vostfr }}{{ else }}{{ .Result.title_phase1 }}{{ end }}"
title_multilang:
text: "{{ .Result.title_phase2 }}"
filters:
- name: re_replace
args: ["(?i)\\b(MULTI(?!.*(?:FRENCH|ENGLISH|VOSTFR)))\\b", "{{ .Config.multilanguage }}"]
title:
text: "{{ if .Config.multilang }}{{ .Result.title_multilang }}{{ else }}{{ .Result.title_phase2 }}{{ end }}"
details:
selector: a
attribute: href
download:
selector: a
attribute: href
poster:
selector: img
attribute: src
size:
selector: div.poid
optional: true
default: "512 MB"
date:
text: now
seeders:
selector: div.up
optional: true
default: 0
leechers:
selector: div.down
optional: true
default: 0
downloadvolumefactor:
text: 0
uploadvolumefactor:
text: 1
# engine n/a