add data folder
This commit is contained in:
parent
e31e1f2549
commit
e36940e4d5
|
@ -1,4 +1,5 @@
|
||||||
data/files/*
|
data/files/*
|
||||||
|
data/torrents/*
|
||||||
__pycache__/
|
__pycache__/
|
||||||
ygg-crawler/node_modules/
|
yggcrawl/__pycache__/
|
||||||
login.py
|
login.py
|
||||||
|
|
|
@ -330,7 +330,7 @@ class YggTorrentScraper:
|
||||||
return torrents
|
return torrents
|
||||||
|
|
||||||
#kopa
|
#kopa
|
||||||
def download_from_torrent_url(self, torrent_url=None, destination_path="./data/files/"):
|
def download_from_torrent_url(self, torrent_url=None, destination_path="./data/torrents/"):
|
||||||
if torrent_url is not None:
|
if torrent_url is not None:
|
||||||
torrent = self.extract_details(torrent_url)
|
torrent = self.extract_details(torrent_url)
|
||||||
|
|
||||||
|
@ -338,14 +338,14 @@ class YggTorrentScraper:
|
||||||
torrent_url=torrent.url, destination_path=destination_path
|
torrent_url=torrent.url, destination_path=destination_path
|
||||||
)
|
)
|
||||||
|
|
||||||
def download_from_torrent(self, torrent=None, destination_path="./data/files/"):
|
def download_from_torrent(self, torrent=None, destination_path="./data/torrents/"):
|
||||||
if torrent is not None:
|
if torrent is not None:
|
||||||
return self.download_from_torrent_download_url(
|
return self.download_from_torrent_download_url(
|
||||||
torrent_url=torrent.url, destination_path=destination_path
|
torrent_url=torrent.url, destination_path=destination_path
|
||||||
)
|
)
|
||||||
|
|
||||||
def download_from_torrent_download_url(
|
def download_from_torrent_download_url(
|
||||||
self, torrent_url=None, destination_path="./data/files/"
|
self, torrent_url=None, destination_path="./data/torrents/"
|
||||||
):
|
):
|
||||||
if torrent_url is None:
|
if torrent_url is None:
|
||||||
raise Exception("Invalid torrent_url, make sure you are logged")
|
raise Exception("Invalid torrent_url, make sure you are logged")
|
||||||
|
|
Loading…
Reference in New Issue