aboutsummaryrefslogtreecommitdiffstats
path: root/tpblite/models/torrents.py
diff options
context:
space:
mode:
Diffstat (limited to 'tpblite/models/torrents.py')
-rw-r--r--tpblite/models/torrents.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tpblite/models/torrents.py b/tpblite/models/torrents.py
index ada282f..5145289 100644
--- a/tpblite/models/torrents.py
+++ b/tpblite/models/torrents.py
@@ -33,6 +33,7 @@ class Torrent:
self._getFileInfo()
)
self.magnetlink = self._getMagnetLink()
+ self.url = self._getUrl()
def __str__(self):
return "{0}, S: {1}, L: {2}, {3}".format(
@@ -63,10 +64,14 @@ class Torrent:
uploader = unicodedata.normalize("NFKD", t[2].replace("ULed by ", "").strip())
return uptime, size, byte_size, uploader
+ def _getUrl(self):
+ tag = self.html_row.find("a", class_="detLink")
+ return tag.get("href")
+
class Torrents:
"""
- Torrent object, takes query response and parses into
+ Torrent object, takes query response and parses into
torrent list or dict. Has methods to select items from
torrent list.
"""