mirror of
https://github.com/Death916/c2cscrape.git
synced 2026-04-10 03:04:40 -07:00
docstrings
This commit is contained in:
parent
83e53bba5c
commit
0690a5d242
1 changed files with 9 additions and 1 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue