Skip to content

TorrentBytes.net - Added check to ensure we grabbed the correct table#238

Open
digi691 wants to merge 1 commit intozone117x:masterfrom
digi691:master
Open

TorrentBytes.net - Added check to ensure we grabbed the correct table#238
digi691 wants to merge 1 commit intozone117x:masterfrom
digi691:master

Conversation

@digi691
Copy link

@digi691 digi691 commented Oct 28, 2015

During configuration If a user's ratio is dangerously low the page displays an extra table with a warning banner. This extra table throws off the jQuery selection. Since the table does not have any identifiers to write a better selector, I just ensure that the amount of rows returned isn't 4, if it is we select the next table.

During configuration If a user's ratio is dangerously low the page displays an extra table with a warning banner.  This extra table throws off the jQuery selection.  Since the table does not have any identifiers to write a better selector, I just ensure that the amount of rows returned isn't 4, if it is we select the next table.
@ghost
Copy link

ghost commented Oct 29, 2015

Is there a better way to do this?
What happens if you search returns 3 torrents ie. 4 rows? Won't it skip all three results believing its the table warning banner

@digi691
Copy link
Author

digi691 commented Oct 29, 2015

I see your point and if it hit that it would return no results. Though the configuration check would still pass as the browse page will always have 15 releases on the first page. Looking at the page's html the one thing I could check for is the bgcolor attribute of the table. The banner table is set to bgcolor="red" where the table with the content that we are looking for does not have that attribute. I could skip the table and go to the next if the bgcolor="red" I don't think this is the greatest idea either because if they change the color of the banner it will break. The only other option I see is to take the first table after the

element. All of this is highly susceptible to breakage if the page's layout changes as they are not using any unique IDs or Classes for the table with the content we are trying to parse. I can work on another PR that is based on one of these methods but at least with this PR it is in an almost working state for someone that has a low ratio.

@ghost
Copy link

ghost commented Oct 30, 2015

I think this project is in hibernation...
This fork will be active for now : https://github.com/Jackett/Jackett

@ghost
Copy link

ghost commented Oct 31, 2015

@digi691 those sort of sites are such a pain to scrape. I think it's better to get it working right than worrying about future changes. When scraping a page you can never to cater to all changes. Returning 3 results is going to be fairly common in sonarr, so the current isn't a great solution.
Could you do if 4 rows and red go to next table? Willing to have a look if you put the html in a pastebin or have an invite.

@josel2000
Copy link

I give a vote in favor I am interested also in that they work Spanish torrent

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

Successfully merging this pull request may close these issues.

2 participants