TorrentBytes.net - Added check to ensure we grabbed the correct table#238
TorrentBytes.net - Added check to ensure we grabbed the correct table#238digi691 wants to merge 1 commit intozone117x:masterfrom
Conversation
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.
|
Is there a better way to do this? |
|
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. |
|
I think this project is in hibernation... |
|
@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. |
|
I give a vote in favor I am interested also in that they work Spanish torrent |
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.