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

[req]: Add a globalfreeleech statement and selector to cardigann so that we can detect global freeleech on torrent search page #15242

Closed
1 task done
garfield69 opened this issue Apr 13, 2024 · 2 comments

Comments

@garfield69
Copy link
Contributor

garfield69 commented Apr 13, 2024

Is there already a request for your feature?

  • I have checked older issues, open and closed

Is your feature request related to a problem? Please describe.

A common problem across many different private sites is that when they have a Global Freeleech event, the Cardigann indexers do not set a freeleech flag for all the results it returns.

Describe the solution you'd like

Set up a new yaml statement and selector so that Cardigann can detect if the torrent search page has a Global Freeeleech event happening, and force a freeleech flag for all results returned.
Suggested example:

 search:
  paths:
    - path: torrents.php
      globalfreeleech:
        selector: div.alert__content:contains("FREELEECH IS ON")
      inputs:
        search: "{{ .Keywords }}"

the selector would be optional in that if its not found no error is generated
But if found then all rows will have the freeleech flag set.

Describe alternatives you've considered

open to suggestions.

@garfield69 garfield69 changed the title [req]: Add a globalfreeleech statement and selector to cardigann so that we can detect glbal freeleech on torrent page [req]: Add a globalfreeleech statement and selector to cardigann so that we can detect global freeleech on torrent search page Apr 13, 2024
@mynameisbogdan
Copy link
Contributor

It's a good idea, but I think it's already possible with :root for CSS selectors. I'm not certain about the JSON selectors.

@garfield69
Copy link
Contributor Author

Holy crap, well spotted.
And I added that statement when I first created the torrent-explosiv indexer 5 years ago!
Forgot all about that CSS option ;-)

I'm going to close this ticket as redundant, and for any private site I have access I will start add any global freeleech I can spot.

Yes, you are right, its mostly going to work for html scrapers, cause for json/xml it will depend on whether they include a global field someplace in the response which most API don't provide.

@garfield69 garfield69 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants