Skip to content

Commit

Permalink
Fix getting results from multipage PirateBay results
Browse files Browse the repository at this point in the history
  • Loading branch information
radek-sprta committed Jun 28, 2018
1 parent f125f3f commit 4028a70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed
- Change user agent to 'Mozilla/5.0 (compatible; Mariner; https://gitlab.com/radek-sprta/mariner)'.

### Fixed
- Fix getting results from multipage PirateBay results

## [1.2.0] - 2018-06-20
### Added
- Make timeout configurable.
Expand Down
3 changes: 2 additions & 1 deletion src/mariner/trackers/piratebay.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def _parse(self, raw: str) -> Iterator[torrent.Torrent]: # pylint: disable=too-
# No search result
yield from []
else:
for torrent_ in torrents[1:]:
# First item is table header, last are links to other pages
for torrent_ in torrents[1:-1]:
raw_name = torrent_.find('a', class_='detLink')
name = PirateBay._parse_name(raw_name)
links = torrent_.find_all('a')
Expand Down

0 comments on commit 4028a70

Please sign in to comment.