docstrings

This commit is contained in:
death916 2025-12-23 03:46:12 -08:00
parent 83e53bba5c
commit 0690a5d242

View file

@ -40,6 +40,10 @@ class TorrentScrape:
return None return None
def get_torrent_link(self): def get_torrent_link(self):
"""
Get torrent link from page
Returns a list of torrent links
"""
links = [] links = []
page = self.get_torrent_page() page = self.get_torrent_page()
if not page: if not page:
@ -92,7 +96,7 @@ class Qbittorrent:
self.port = 8080 self.port = 8080
def get_credentials(self): def get_credentials(self):
# Get qbittorrent credentials from .env file """Get qbittorrent credentials from .env file"""
load_dotenv() # gets credentials from env file load_dotenv() # gets credentials from env file
self.username = os.getenv("QB_USERNAME") self.username = os.getenv("QB_USERNAME")
self.password = os.getenv("QB_PASSWORD") self.password = os.getenv("QB_PASSWORD")
@ -103,6 +107,10 @@ class Qbittorrent:
raise ValueError("QB_USERNAME and QB_PASSWORD must be set in .env file") raise ValueError("QB_USERNAME and QB_PASSWORD must be set in .env file")
def add_torrent(self, links): def add_torrent(self, links):
"""
Add torrents to qbittorrent
Takes a list of links and adds them to qbittorrent
"""
conn_info = dict( conn_info = dict(
host=self.host, host=self.host,
port=self.port, port=self.port,