Skip to content

Commit

Permalink
fix #1544
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Feb 26, 2024
1 parent a0af827 commit 2614eea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/modules/indexer/spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ def __get_leechers(self, torrent):
item = self.__index(items, selector)
if item:
peers_val = item.split("/")[0]
peers_val = peers_val.replace(",", "")
peers_val = self.__filter_text(peers_val,
selector.get('filters'))
self.torrents_info['peers'] = int(peers_val) if peers_val and peers_val.isdigit() else 0
Expand All @@ -447,6 +448,7 @@ def __get_seeders(self, torrent):
item = self.__index(items, selector)
if item:
seeders_val = item.split("/")[0]
seeders_val = seeders_val.replace(",", "")
seeders_val = self.__filter_text(seeders_val,
selector.get('filters'))
self.torrents_info['seeders'] = int(seeders_val) if seeders_val and seeders_val.isdigit() else 0
Expand All @@ -464,6 +466,7 @@ def __get_grabs(self, torrent):
item = self.__index(items, selector)
if item:
grabs_val = item.split("/")[0]
grabs_val = grabs_val.replace(",", "")
grabs_val = self.__filter_text(grabs_val,
selector.get('filters'))
self.torrents_info['grabs'] = int(grabs_val) if grabs_val and grabs_val.isdigit() else 0
Expand Down

0 comments on commit 2614eea

Please sign in to comment.