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

Torrentleech not working #83

Closed
A7HN opened this issue Jul 15, 2024 · 4 comments
Closed

Torrentleech not working #83

A7HN opened this issue Jul 15, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@A7HN
Copy link

A7HN commented Jul 15, 2024

The current noResultsMatcher "No results found" no longer works. I've tried the following locally:

"Found 0 torrents"
"Found<br><b>0</b><br>torrents.".

I also tried experimenting with EL_COUNT. Torrentleech and podnapisi seem to have a similar results page.

Podnapisi.net:

<table class="table table-striped table-hover">
      <tbody><tr class="subtitle-entry" data-href="/en/subtitles/en-dune-part-two-2024/2wpI">

Torrentleech:

<table class="table table-striped table-hover torrents">
	<tbody><tr class="torrent" data-tid="241312895">

But while the following works for podnapisi:

"noResultsMatcher": ["EL_COUNT", "table.table tr.subtitle-entry", "GT", 0],

This doesn't work for torrentleech:

"noResultsMatcher": ["EL_COUNT", "table.table tr.torrent", "GT", 0],

Any advice on how to get this working?

@buzz buzz added the bug Something isn't working label Jul 16, 2024
@buzz
Copy link
Owner

buzz commented Jul 16, 2024

I can't test this as I don't have an account there.

Thus I can only give general directions. Probably the site has changed the result page. The easiest is to use a string for noResultsMatcher. For this to work, look at the result page source. The string has to match exactly against the returned HTML.

  • Some pages don't show a message but just an empty table/list. That's what the EL_COUNT workaround is for.
  • Some pages use POST requests. That's a different topic. Look at ofdb for an example.
  • Some dynamic websites use API calls. Then this extension will not be able to retrieve results unfortunately.

Maybe @Kotaless wants to chime in and is able to resolve this (#63).

@Kotaless
Copy link

Hi. I'm no web dev but have some findings.
"No results found." text can be seen through developer tools, but if I directly display the page source, it's not there.
I also compared page sources of successful and unsuccessful results and they are identical.
image
image

@A7HN
Copy link
Author

A7HN commented Jul 16, 2024

There are two java script get requests after performing a search that are just before the html page request. The first script has four "No results found". One of these:

if (total === 0) { torrentsTable = Object(__WEBPACK_IMPORTED_MODULE_0_snabbdom_jsx__["html"])( 'div', { classNames: 'results empty mt-30' }, 'No results found.'

Matches the div class on the results page:

image

@buzz
Copy link
Owner

buzz commented Jul 17, 2024

"No results found." text can be seen through developer tools, but if I directly display the page source, it's not there.
I also compared page sources of successful and unsuccessful results and they are identical.

It's a dynamic website.

Some dynamic websites use API calls. Then this extension will not be able to retrieve results unfortunately.

This extension merely retrieves static HTML pages, it doesn't execute any site-specific JS or has knowledge about specific APIs (not unless #9 is resolved).

Thanks for digging into this though.

@buzz buzz closed this as completed in 0343d91 Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants