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

[darmowe torrenty] indexer error: index was out of range #9782

Closed
lukjod opened this issue Oct 8, 2020 · 8 comments
Closed

[darmowe torrenty] indexer error: index was out of range #9782

lukjod opened this issue Oct 8, 2020 · 8 comments

Comments

@lukjod
Copy link

lukjod commented Oct 8, 2020

recently i'm getting errors from this indexer, what can be wrong?
Jackett from linuxserver docker.
log error 1:
https://pastebin.pl/view/136ef062
log error 2:
https://pastebin.pl/view/f4a80d7a
thx

@lukjod lukjod changed the title [darmowe torrenty] indexer error [darmowe torrenty] indexer error: index was out of range Oct 8, 2020
@garfield69
Copy link
Contributor

So the darmowe torrenty web site presents torrent results for each torrent spread across three rows, and the indexer expect and joins the 3 rows for each torrent to extract the relevant details.
However, it appears that when you do a search for which the DT site has no results, (such as searching for Books of Blood 2020 like you did in your report), the site is return a nothing found message that consist of just two rows, which the Jackett indexer is not expecting.
The missing row is the cause of the error about the index being out of bounds: Error on 20201008105728 for Darmowe torrenty.txtSystem.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection

I will need to research how to make the indexer cope with the site's current no results found result.

@garfield69 garfield69 self-assigned this Oct 8, 2020
@lukjod
Copy link
Author

lukjod commented Oct 8, 2020

Thank You very much detailed explenation of this error. True is that beside giving error output, rest works ok and finds titles which are present on indexer so not a big deal it fully works, just wanted to let You know about its behavior.
Thanks again

@garfield69
Copy link
Contributor

@ngosang the yaml error statement in the search block is supposed to be a way to trap no-results messages for when a web site returns rows that do not contain the expected selectors, and is supposed to prevent an actual error event by returning null or continue or whatever it is that happens when a normal search does not find anything.

search:
  paths:
    # https://darmowe-torenty.pl/torrenty.php?search=&category=0
    - path: torrenty.php
  inputs:
    # does not support multi cat search
    category: 0
    search: "{{ .Keywords }}"
    erotyka: 1
    strona: 0
    # does not support imdbid searching and does not display imdb links in results
  error:
    - selector: td.lista:contains("Nie ma torrentów")

instead, cardigann generates an actual error log


2020-10-09 09:03:39 | Error | Jackett.Common.IndexerException: Exception (darmowetorenty): 
Error: Nie ma torrentów...  ---> System.Exception: 
Parse error  ---> Jackett.Common.ExceptionWithConfigData: 
Error: Nie ma torrentów...   
at Jackett.Common.Indexers.CardigannIndexer.checkForError(WebResult loginResult, IList`1 errorBlocks) in D:\a\1\s\src\Jackett.Common\Indexers\CardigannIndexer.cs:line 478    
at Jackett.Common.Indexers.CardigannIndexer.PerformQuery(TorznabQuery query) in D:\a\1\s\src\Jackett.Common\Indexers\CardigannIndexer.cs:line 1379    --- End of inner exception stack trace ---    
at Jackett.Common.Indexers.BaseWebIndexer.OnParseError(String results, Exception ex) in D:\a\1\s\src\Jackett.Common\Indexers\BaseIndexer.cs:line 756    
at Jackett.Common.Indexers.CardigannIndexer.PerformQuery(TorznabQuery query) in D:\a\1\s\src\Jackett.Common\Indexers\CardigannIndexer.cs:line 1706    
at Jackett.Common.Indexers.BaseIndexer.ResultsForQuery(TorznabQuery query) in D:\a\1\s\src\Jackett.Common\Indexers\BaseIndexer.cs:line 331    --- End of inner exception stack trace ---    
at Jackett.Common.Indexers.BaseIndexer.ResultsForQuery(TorznabQuery query) in D:\a\1\s\src\Jackett.Common\Indexers\BaseIndexer.cs:line 351    
at Jackett.Common.Indexers.BaseWebIndexer.ResultsForQuery(TorznabQuery query) in D:\a\1\s\src\Jackett.Common\Indexers\BaseIndexer.cs:line 729    
at Jackett.Server.Controllers.ResultsController.Results(ApiSearch requestt) in D:\a\1\s\src\Jackett.Server\Controllers\ResultsController.cs:line 224

can this be corrected?

@ngosang
Copy link
Member

ngosang commented Oct 8, 2020

I don't know much about Cardigann but I think that error block in that context is not to skip rows, is to detect whole page errors like you are banned, this is not available in your country, you are not logged in. In that case it makes sense to show the error.
This is the code => https://github.com/Jackett/Jackett/blob/master/src/Jackett.Common/Indexers/CardigannIndexer.cs#L478

garfield69 added a commit that referenced this issue Oct 9, 2020
and merge two TR instead of three TD
but it still does not help with handling not-found :-(
@garfield69
Copy link
Contributor

ok. well in that case there is nothing can be done for this web site using yaml.

I've managed to reduce the row processing from three TD selectors to two TR selectors, but the not-found message has just the one TR, so I still cant get yaml to handle not-found for this site.

the only way to currently prevent this error handle this would be if the indexer was re-written in C#

@ertugrulk
Copy link
Contributor

hey @garfield69 , I can take this issue & rewrite in C#

@ngosang
Copy link
Member

ngosang commented Oct 10, 2020

@ertugrulk go for it!

@garfield69
Copy link
Contributor

Jackett 0.16.1709

@garfield69 garfield69 removed their assignment Oct 13, 2020
@garfield69 garfield69 added Down / Waiting for removal Site is 522/500/403/302. To be Monitored. If still offline after 30d then Indexer will be removed. and removed Confirmed Needs C# Rewrite in C# Down / Waiting for removal Site is 522/500/403/302. To be Monitored. If still offline after 30d then Indexer will be removed. labels Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants