[piratebay] bug on empty result page corrected
This commit is contained in:
parent
d1c34f89d8
commit
c977a6a2fe
1 changed files with 5 additions and 2 deletions
|
|
@ -18,7 +18,7 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from weboob.tools.browser import BasePage
|
||||
from weboob.tools.browser import BasePage,BrokenPageError
|
||||
from weboob.capabilities.torrent import Torrent
|
||||
from weboob.capabilities.base import NotAvailable
|
||||
|
||||
|
|
@ -37,7 +37,10 @@ class TorrentsPage(BasePage):
|
|||
return float(n * m[u])
|
||||
|
||||
def iter_torrents(self):
|
||||
table = self.parser.select(self.document.getroot(), 'table#searchResult', 1)
|
||||
try:
|
||||
table = self.parser.select(self.document.getroot(), 'table#searchResult', 1)
|
||||
except BrokenPageError as e:
|
||||
return
|
||||
first = True
|
||||
for tr in table.getiterator('tr'):
|
||||
if first:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue