Skip to content

Commit

Permalink
Fixed #60 -- All 100 top torrents are now returned
Browse files Browse the repository at this point in the history
No longer need for cutting off pagination from the torrent results.
  • Loading branch information
Unai Zalakain committed Jan 25, 2014
1 parent 0b0be9e commit 7773f4b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
### Master

### v1.3.4

* Fix: return all the 100 top torrents
* Fix: readme typo

### v1.3.3

* Add: tox support for running tests
Expand Down
3 changes: 3 additions & 0 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ def test_url(self):
self.assertEqual(str(self.torrents.url),
self.url + '/top/100')

def test_results(self):
self.assertEqual(len(list(self.torrents.items())), 100)


class TPBTestCase(RemoteTestCase):
def setUp(self):
Expand Down
2 changes: 1 addition & 1 deletion tpb/tpb.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _get_torrent_rows(self, page):
if table is None: # no table means no results:
return []
else:
return table.findall('.//tr')[1:31] # get all rows but header, pagination
return table.findall('.//tr')[1:] # get all rows but header

def _build_torrent(self, row):
"""
Expand Down

0 comments on commit 7773f4b

Please sign in to comment.