dreulavelle / Prowlarr-Indexers

Prowlarr Indexers used by Cardigann
87 stars 17 forks source link

ValidationFailure: Selector "" didn't match {...} #24

Closed J4NS-R closed 2 months ago

J4NS-R commented 6 months ago

Hi, thanks for this Indexer. I just added in the yaml files and restarted Prowlarr, but when trying to add and test Torrentio from the UI, I get this error:

image

Any ideas as to what could be wrong?

aGhosh02 commented 6 months ago

Not sure what this infohash does but changing this in torrentio.yml fixed the issue for me. in fields > infohash use below code

infohash:
      selector: infoHash
J4NS-R commented 6 months ago

Hmm, no dice

Screenshot_20240329_124854

aGhosh02 commented 6 months ago

Try This

---
id: torrentio-public
name: Public (rate-limited) Torrentio
description: "Torrentio Indexer (Public, rate-limited)"
language: en-US
type: public
encoding: UTF-8
followredirect: false
testlinktorrent: false
requestDelay: 20
links:
  - https://torrentio.strem.fun/
caps:
  categories:
    Movies: Movies
    TV: TV

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

settings:
  - name: opt_label
    type: info
    label: Torrentio Options are Required
  - name: default_opts
    type: text
    label: Torrentio Options
    default: "providers=yts,eztv,rarbg,1337x|sort=qualitysize|qualityfilter=480p,scr,cam"
  - name: rdkey_label
    type: info
    label: Debrid settings required
  - name: debrid_provider_key
    type: text
    label: Debrid provider API Key
    default: ""
  - name: debrid_provider
    type: select
    label: Debrid provider
    default: realdebrid
    options:
      realdebrid: Real-Debrid
      alldebrid: AllDebrid
      premiumize: Premiumize
      debridlink: Debridlink
      offcloud: Offcloud
      putio: Put.io
  - name: validation_label
    type: info
    label: Validation settings optional
  - name: validate_imdb_movie_label
    type: info
    label: The following help to validate an indexer in Sonarr by confirming that the show returns results
  - name: validate_imdb_movie
    type: text
    label: IMDB ID of Movie to use for Radarr validation (must exist in indexer)
    default: "tt0137523" # Fight Club
  - name: validate_imdb_tv_label
    type: info
    label: The following help to validate an indexer in Sonarr by confirming that the show returns results
  - name: validate_imdb_tv
    type: text
    label: IMDB ID TV show to use for Sonarr validation (must exist in indexer)
    default: "tt9288030" # Reacher S02E01

search:
  headers:
    User-Agent:
      [
        "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0",
      ]
  paths:
    - path: "{{ if .Query.IMDBID }}{{ .Config.default_opts }}|{{ .Config.debrid_provider }}={{ .Config.debrid_provider_key }}/stream/movie/{{ .Query.IMDBID }}.json{{ else }}providers=rarbg,1337x|sort=size|qualityfilter=brremux,hdrall,dolbyvision,4k,720p,480p,other,scr,cam,unknown|sort=size|limit=1|{{ .Config.debrid_provider }}={{ .Config.debrid_provider_key }}/stream/movie/{{ .Config.validate_imdb_movie }}.json{{ end }}"
      method: get
      response:
        type: json
        noResultsMessage: '"streams": []'
      categories: [Movies]
    - path: "{{ if .Query.IMDBID }}{{ .Config.default_opts }}{{else}}providers=rarbg,1337x|sort=size|qualityfilter=brremux,hdrall,dolbyvision,4k,720p,480p,other,scr,cam,unknown|limit=1{{ end }}|{{ .Config.debrid_provider }}={{ .Config.debrid_provider_key }}/stream/series/{{ if .Query.IMDBID }}{{ .Query.IMDBID}}{{ else }}{{ .Config.validate_imdb_tv }}{{ end }}:{{ if .Query.Season }}{{ .Query.Season }}{{ else }}1{{ end }}:{{ if .Query.Ep }}{{ .Query.Ep }}{{ else }}1{{ end }}.json"
      method: get
      response:
        type: json
        noResultsMessage: '"streams": []'
      categories: [TV]

  rows:
    selector: streams
    missingAttributeEqualsNoResults: true

  fields:
    title:
      selector: title
      filters:
        - name: split
          args: ["\n", 0]
    year:
      selector: title
      filters:
        - name: regexp
          args: "(\\b(19|20)\\d\\d\\b)"
    category_is_tv_show:
      text: "{{ .Result.title }}"
      filters:
        - name: regexp
          args: "\\b(S\\d+(?:E\\d+)?)\\b"
    category:
      text: "{{ if .Result.category_is_tv_show }}TV{{ else }}Movies{{ end }}"
    infohash:
      selector: infoHash
    size:
      selector: title
      filters:
        - name: regexp
          args: "\\b(\\d+(?:\\.\\d+)? [MG]B)\\b"
    seeders:
      selector: title
      filters:
        - name: regexp
          args: "(?<=šŸ‘¤ )(\\d+)"
J4NS-R commented 6 months ago

Test succeeded! Thanks @aGhosh02. I was suspicious about that emoji at the end but somehow it works.

I've made a PR to update torrentio.yml

djsecrist commented 6 months ago

I'm getting a similar error, even with the new PR...

Unable to connect to indexer, check the log above the ValidationFailure for more details. Error while parsing field=infohash, selector=infoHash, value=: Selector "" didn't match { "name": "[RD+] Torrentio\n1080p", "title": "Fight.Club.1999.1080p.BluRay.AVC.DTS-HD.MA.5.1-FGT\nšŸ‘¤ 2 šŸ’¾ 43.1 GB āš™ļø 1337x", "url":

MrMookdog commented 6 months ago

Yeah getting the same red error when setting up torrentio in prowlarr

dreulavelle commented 5 months ago

Whats the status on this? Has corrections been made?

KillsT3aler69 commented 5 months ago

Try This

---
id: torrentio-public
name: Public (rate-limited) Torrentio
description: "Torrentio Indexer (Public, rate-limited)"
language: en-US
type: public
encoding: UTF-8
followredirect: false
testlinktorrent: false
requestDelay: 20
links:
  - https://torrentio.strem.fun/
caps:
  categories:
    Movies: Movies
    TV: TV

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

settings:
  - name: opt_label
    type: info
    label: Torrentio Options are Required
  - name: default_opts
    type: text
    label: Torrentio Options
    default: "providers=yts,eztv,rarbg,1337x|sort=qualitysize|qualityfilter=480p,scr,cam"
  - name: rdkey_label
    type: info
    label: Debrid settings required
  - name: debrid_provider_key
    type: text
    label: Debrid provider API Key
    default: ""
  - name: debrid_provider
    type: select
    label: Debrid provider
    default: realdebrid
    options:
      realdebrid: Real-Debrid
      alldebrid: AllDebrid
      premiumize: Premiumize
      debridlink: Debridlink
      offcloud: Offcloud
      putio: Put.io
  - name: validation_label
    type: info
    label: Validation settings optional
  - name: validate_imdb_movie_label
    type: info
    label: The following help to validate an indexer in Sonarr by confirming that the show returns results
  - name: validate_imdb_movie
    type: text
    label: IMDB ID of Movie to use for Radarr validation (must exist in indexer)
    default: "tt0137523" # Fight Club
  - name: validate_imdb_tv_label
    type: info
    label: The following help to validate an indexer in Sonarr by confirming that the show returns results
  - name: validate_imdb_tv
    type: text
    label: IMDB ID TV show to use for Sonarr validation (must exist in indexer)
    default: "tt9288030" # Reacher S02E01

search:
  headers:
    User-Agent:
      [
        "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0",
      ]
  paths:
    - path: "{{ if .Query.IMDBID }}{{ .Config.default_opts }}|{{ .Config.debrid_provider }}={{ .Config.debrid_provider_key }}/stream/movie/{{ .Query.IMDBID }}.json{{ else }}providers=rarbg,1337x|sort=size|qualityfilter=brremux,hdrall,dolbyvision,4k,720p,480p,other,scr,cam,unknown|sort=size|limit=1|{{ .Config.debrid_provider }}={{ .Config.debrid_provider_key }}/stream/movie/{{ .Config.validate_imdb_movie }}.json{{ end }}"
      method: get
      response:
        type: json
        noResultsMessage: '"streams": []'
      categories: [Movies]
    - path: "{{ if .Query.IMDBID }}{{ .Config.default_opts }}{{else}}providers=rarbg,1337x|sort=size|qualityfilter=brremux,hdrall,dolbyvision,4k,720p,480p,other,scr,cam,unknown|limit=1{{ end }}|{{ .Config.debrid_provider }}={{ .Config.debrid_provider_key }}/stream/series/{{ if .Query.IMDBID }}{{ .Query.IMDBID}}{{ else }}{{ .Config.validate_imdb_tv }}{{ end }}:{{ if .Query.Season }}{{ .Query.Season }}{{ else }}1{{ end }}:{{ if .Query.Ep }}{{ .Query.Ep }}{{ else }}1{{ end }}.json"
      method: get
      response:
        type: json
        noResultsMessage: '"streams": []'
      categories: [TV]

  rows:
    selector: streams
    missingAttributeEqualsNoResults: true

  fields:
    title:
      selector: title
      filters:
        - name: split
          args: ["\n", 0]
    year:
      selector: title
      filters:
        - name: regexp
          args: "(\\b(19|20)\\d\\d\\b)"
    category_is_tv_show:
      text: "{{ .Result.title }}"
      filters:
        - name: regexp
          args: "\\b(S\\d+(?:E\\d+)?)\\b"
    category:
      text: "{{ if .Result.category_is_tv_show }}TV{{ else }}Movies{{ end }}"
    infohash:
      selector: infoHash
    size:
      selector: title
      filters:
        - name: regexp
          args: "\\b(\\d+(?:\\.\\d+)? [MG]B)\\b"
    seeders:
      selector: title
      filters:
        - name: regexp
          args: "(?<=šŸ‘¤ )(\\d+)"

This fixed the issue for me

dreulavelle commented 5 months ago

Please submit the PR for it.

MrMookdog commented 5 months ago

Still didnt work for me. Got the same error in prowlarr